X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/lib/htmlpurifier/HTMLPurifier/AttrDef/CSS
home
/
cbholdings
/
pasukulu
/
lib
/
htmlpurifier
/
HTMLPurifier
/
AttrDef
/
CSS
/
📁
..
📄
AlphaValue.php
(793 B)
📄
Background.php
(3.24 KB)
📄
BackgroundPosition.php
(4.07 KB)
📄
Border.php
(1.55 KB)
📄
Color.php
(4.57 KB)
📄
Composite.php
(1.3 KB)
📄
DenyElementDecorator.php
(1.05 KB)
📄
Filter.php
(2.27 KB)
📄
Font.php
(6.45 KB)
📄
FontFamily.php
(9.19 KB)
📄
Ident.php
(724 B)
📄
ImportantDecorator.php
(1.56 KB)
📄
Length.php
(1.85 KB)
📄
ListStyle.php
(2.84 KB)
📄
Multiple.php
(2.04 KB)
📄
Number.php
(2.23 KB)
📄
Percentage.php
(1.25 KB)
📄
TextDecoration.php
(1.13 KB)
📄
URI.php
(2.51 KB)
Editing: Multiple.php
<?php /** * Framework class for strings that involve multiple values. * * Certain CSS properties such as border-width and margin allow multiple * lengths to be specified. This class can take a vanilla border-width * definition and multiply it, usually into a max of four. * * @note Even though the CSS specification isn't clear about it, inherit * can only be used alone: it will never manifest as part of a multi * shorthand declaration. Thus, this class does not allow inherit. */ class HTMLPurifier_AttrDef_CSS_Multiple extends HTMLPurifier_AttrDef { /** * Instance of component definition to defer validation to. * @type HTMLPurifier_AttrDef * @todo Make protected */ public $single; /** * Max number of values allowed. * @todo Make protected */ public $max; /** * @param HTMLPurifier_AttrDef $single HTMLPurifier_AttrDef to multiply * @param int $max Max number of values allowed (usually four) */ public function __construct($single, $max = 4) { $this->single = $single; $this->max = $max; } /** * @param string $string * @param HTMLPurifier_Config $config * @param HTMLPurifier_Context $context * @return bool|string */ public function validate($string, $config, $context) { $string = $this->mungeRgb($this->parseCDATA($string)); if ($string === '') { return false; } $parts = explode(' ', $string); // parseCDATA replaced \r, \t and \n $length = count($parts); $final = ''; for ($i = 0, $num = 0; $i < $length && $num < $this->max; $i++) { if (ctype_space($parts[$i])) { continue; } $result = $this->single->validate($parts[$i], $config, $context); if ($result !== false) { $final .= $result . ' '; $num++; } } if ($final === '') { return false; } return rtrim($final); } } // vim: et sw=4 sts=4
Upload File
Create Folder