62        $string = trim($string);
 
   63        $string = str_replace(array(
"\n", 
"\t", 
"\r"), 
' ', $string);
 
   72    public function make($string)
 
   89        return preg_replace(
'/rgb\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\)/', 
'rgb(\1,\2,\3)', $string);
 
  100        for ($i = 0, $c = strlen($string); $i < $c; $i++) {
 
  101            if ($string[$i] === 
'\\') {
 
  107                if (ctype_xdigit($string[$i])) {
 
  109                    for ($a = 1, $i++; $i < $c && $a < 6; $i++, $a++) {
 
  110                        if (!ctype_xdigit($string[$i])) {
 
  113                        $code .= $string[$i];
 
  123                    if ($i < $c && trim($string[$i]) !== 
'') {
 
  128                if ($string[$i] === 
"\n") {
 
An exception for terminatinating execution or to throw for unit testing.
Base class for all validating attribute definitions.
parseCDATA($string)
Convenience method that parses a string as if it were CDATA.
$required
Tells us whether or not an HTML attribute is required.
$minimized
Tells us whether or not an HTML attribute is minimized.
mungeRgb($string)
Removes spaces from rgb(0, 0, 0) so that shorthand CSS properties work properly.
expandCSSEscape($string)
Parses a possibly escaped CSS string and returns the "pure" version of it.
make($string)
Factory method for creating this class from a string.
validate($string, $config, $context)
Validates and cleans passed string according to a definition.
static unichr($code)
Translates a Unicode codepoint into its corresponding UTF-8 character.
static cleanUTF8($str, $force_php=false)
Cleans a UTF-8 string for well-formedness and SGML validity.