From fe030e7339f5fc9ec4e75d9655b2ced0900da5c2 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 21 Oct 2014 22:53:36 +0200 Subject: use composer for autoloading repos --- .../library/HTMLPurifier/AttrDef/CSS/URI.php | 74 ---------------------- 1 file changed, 74 deletions(-) delete mode 100644 3rdparty/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php (limited to '3rdparty/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php') diff --git a/3rdparty/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php b/3rdparty/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php deleted file mode 100644 index f9434230e..000000000 --- a/3rdparty/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/URI.php +++ /dev/null @@ -1,74 +0,0 @@ -parseCDATA($uri_string); - if (strpos($uri_string, 'url(') !== 0) { - return false; - } - $uri_string = substr($uri_string, 4); - $new_length = strlen($uri_string) - 1; - if ($uri_string[$new_length] != ')') { - return false; - } - $uri = trim(substr($uri_string, 0, $new_length)); - - if (!empty($uri) && ($uri[0] == "'" || $uri[0] == '"')) { - $quote = $uri[0]; - $new_length = strlen($uri) - 1; - if ($uri[$new_length] !== $quote) { - return false; - } - $uri = substr($uri, 1, $new_length - 1); - } - - $uri = $this->expandCSSEscape($uri); - - $result = parent::validate($uri, $config, $context); - - if ($result === false) { - return false; - } - - // extra sanity check; should have been done by URI - $result = str_replace(array('"', "\\", "\n", "\x0c", "\r"), "", $result); - - // suspicious characters are ()'; we're going to percent encode - // them for safety. - $result = str_replace(array('(', ')', "'"), array('%28', '%29', '%27'), $result); - - // there's an extra bug where ampersands lose their escaping on - // an innerHTML cycle, so a very unlucky query parameter could - // then change the meaning of the URL. Unfortunately, there's - // not much we can do about that... - return "url(\"$result\")"; - } -} - -// vim: et sw=4 sts=4 -- cgit v1.2.3