From adf17b677edeb2387671f6a0f12123e7497b5938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 18 Jan 2015 20:07:46 +0100 Subject: remove 3rd libraries --- .../htmlpurifier/HTMLPurifier/AttrDef/Enum.php | 73 ---------------------- 1 file changed, 73 deletions(-) delete mode 100644 inc/3rdparty/htmlpurifier/HTMLPurifier/AttrDef/Enum.php (limited to 'inc/3rdparty/htmlpurifier/HTMLPurifier/AttrDef/Enum.php') diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier/AttrDef/Enum.php b/inc/3rdparty/htmlpurifier/HTMLPurifier/AttrDef/Enum.php deleted file mode 100644 index b40122b6..00000000 --- a/inc/3rdparty/htmlpurifier/HTMLPurifier/AttrDef/Enum.php +++ /dev/null @@ -1,73 +0,0 @@ -valid_values = array_flip($valid_values); - $this->case_sensitive = $case_sensitive; - } - - /** - * @param string $string - * @param HTMLPurifier_Config $config - * @param HTMLPurifier_Context $context - * @return bool|string - */ - public function validate($string, $config, $context) - { - $string = trim($string); - if (!$this->case_sensitive) { - // we may want to do full case-insensitive libraries - $string = ctype_lower($string) ? $string : strtolower($string); - } - $result = isset($this->valid_values[$string]); - - return $result ? $string : false; - } - - /** - * @param string $string In form of comma-delimited list of case-insensitive - * valid values. Example: "foo,bar,baz". Prepend "s:" to make - * case sensitive - * @return HTMLPurifier_AttrDef_Enum - */ - public function make($string) - { - if (strlen($string) > 2 && $string[0] == 's' && $string[1] == ':') { - $string = substr($string, 2); - $sensitive = true; - } else { - $sensitive = false; - } - $values = explode(',', $string); - return new HTMLPurifier_AttrDef_Enum($values, $sensitive); - } -} - -// vim: et sw=4 sts=4 -- cgit v1.2.3