17        parent::__construct(
true); 
 
   32        if (strpos($uri_string, 
'url(') !== 0) {
 
   35        $uri_string = substr($uri_string, 4);
 
   36        if (strlen($uri_string) == 0) {
 
   39        $new_length = strlen($uri_string) - 1;
 
   40        if ($uri_string[$new_length] != 
')') {
 
   43        $uri = trim(substr($uri_string, 0, $new_length));
 
   45        if (!empty($uri) && ($uri[0] == 
"'" || $uri[0] == 
'"')) {
 
   47            $new_length = strlen($uri) - 1;
 
   48            if ($uri[$new_length] !== $quote) {
 
   51            $uri = substr($uri, 1, $new_length - 1);
 
   63        $result = str_replace(array(
'"', 
"\\", 
"\n", 
"\x0c", 
"\r"), 
"", 
$result);
 
   67        $result = str_replace(array(
'(', 
')', 
"'"), array(
'%28', 
'%29', 
'%27'), 
$result);
 
   73        return "url(\"$result\")";
 
An exception for terminatinating execution or to throw for unit testing.
Validates a URI in CSS syntax, which uses url('http://example.com')
validate($uri_string, $config, $context)
Validates a URI as defined by RFC 3986.
parseCDATA($string)
Convenience method that parses a string as if it were CDATA.
expandCSSEscape($string)
Parses a possibly escaped CSS string and returns the "pure" version of it.