From f718e2b0db0fe3477212a8dd6c3ec067f4432862 Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Sat, 18 Mar 2017 17:50:05 +0100 Subject: :arrow_up: Update HTML Purifier library. Updated HTML Purifier from 4.6.0 to 4.9.2 with better PHP7 compatibility. Used composer to manage this library. --- library/HTMLPurifier/Token/Comment.php | 38 ------------------- library/HTMLPurifier/Token/Empty.php | 15 -------- library/HTMLPurifier/Token/End.php | 24 ------------ library/HTMLPurifier/Token/Start.php | 10 ----- library/HTMLPurifier/Token/Tag.php | 68 ---------------------------------- library/HTMLPurifier/Token/Text.php | 53 -------------------------- 6 files changed, 208 deletions(-) delete mode 100644 library/HTMLPurifier/Token/Comment.php delete mode 100644 library/HTMLPurifier/Token/Empty.php delete mode 100644 library/HTMLPurifier/Token/End.php delete mode 100644 library/HTMLPurifier/Token/Start.php delete mode 100644 library/HTMLPurifier/Token/Tag.php delete mode 100644 library/HTMLPurifier/Token/Text.php (limited to 'library/HTMLPurifier/Token') diff --git a/library/HTMLPurifier/Token/Comment.php b/library/HTMLPurifier/Token/Comment.php deleted file mode 100644 index 23453c705..000000000 --- a/library/HTMLPurifier/Token/Comment.php +++ /dev/null @@ -1,38 +0,0 @@ -data = $data; - $this->line = $line; - $this->col = $col; - } - - public function toNode() { - return new HTMLPurifier_Node_Comment($this->data, $this->line, $this->col); - } -} - -// vim: et sw=4 sts=4 diff --git a/library/HTMLPurifier/Token/Empty.php b/library/HTMLPurifier/Token/Empty.php deleted file mode 100644 index 78a95f555..000000000 --- a/library/HTMLPurifier/Token/Empty.php +++ /dev/null @@ -1,15 +0,0 @@ -empty = true; - return $n; - } -} - -// vim: et sw=4 sts=4 diff --git a/library/HTMLPurifier/Token/End.php b/library/HTMLPurifier/Token/End.php deleted file mode 100644 index 59b38fdc5..000000000 --- a/library/HTMLPurifier/Token/End.php +++ /dev/null @@ -1,24 +0,0 @@ -toNode not supported!"); - } -} - -// vim: et sw=4 sts=4 diff --git a/library/HTMLPurifier/Token/Start.php b/library/HTMLPurifier/Token/Start.php deleted file mode 100644 index 019f317ad..000000000 --- a/library/HTMLPurifier/Token/Start.php +++ /dev/null @@ -1,10 +0,0 @@ -!empty($obj->is_tag) - * without having to use a function call is_a(). - * @type bool - */ - public $is_tag = true; - - /** - * The lower-case name of the tag, like 'a', 'b' or 'blockquote'. - * - * @note Strictly speaking, XML tags are case sensitive, so we shouldn't - * be lower-casing them, but these tokens cater to HTML tags, which are - * insensitive. - * @type string - */ - public $name; - - /** - * Associative array of the tag's attributes. - * @type array - */ - public $attr = array(); - - /** - * Non-overloaded constructor, which lower-cases passed tag name. - * - * @param string $name String name. - * @param array $attr Associative array of attributes. - * @param int $line - * @param int $col - * @param array $armor - */ - public function __construct($name, $attr = array(), $line = null, $col = null, $armor = array()) - { - $this->name = ctype_lower($name) ? $name : strtolower($name); - foreach ($attr as $key => $value) { - // normalization only necessary when key is not lowercase - if (!ctype_lower($key)) { - $new_key = strtolower($key); - if (!isset($attr[$new_key])) { - $attr[$new_key] = $attr[$key]; - } - if ($new_key !== $key) { - unset($attr[$key]); - } - } - } - $this->attr = $attr; - $this->line = $line; - $this->col = $col; - $this->armor = $armor; - } - - public function toNode() { - return new HTMLPurifier_Node_Element($this->name, $this->attr, $this->line, $this->col, $this->armor); - } -} - -// vim: et sw=4 sts=4 diff --git a/library/HTMLPurifier/Token/Text.php b/library/HTMLPurifier/Token/Text.php deleted file mode 100644 index f26a1c211..000000000 --- a/library/HTMLPurifier/Token/Text.php +++ /dev/null @@ -1,53 +0,0 @@ -data = $data; - $this->is_whitespace = ctype_space($data); - $this->line = $line; - $this->col = $col; - } - - public function toNode() { - return new HTMLPurifier_Node_Text($this->data, $this->is_whitespace, $this->line, $this->col); - } -} - -// vim: et sw=4 sts=4 -- cgit v1.2.3