1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-17 22:31:30 +00:00

Revert "Update HTML Purifier to version 4.4.0."

This reverts commit dd205fbad6.
This commit is contained in:
Andrew Dolgov
2012-06-05 21:52:37 +04:00
parent 010efc9b81
commit cb73535c8e
61 changed files with 362 additions and 1031 deletions

View File

@@ -1,24 +0,0 @@
<?php
/**
* Validates based on {ident} CSS grammar production
*/
class HTMLPurifier_AttrDef_CSS_Ident extends HTMLPurifier_AttrDef
{
public function validate($string, $config, $context) {
$string = trim($string);
// early abort: '' and '0' (strings that convert to false) are invalid
if (!$string) return false;
$pattern = '/^(-?[A-Za-z_][A-Za-z_\-0-9]*)$/';
if (!preg_match($pattern, $string)) return false;
return $string;
}
}
// vim: et sw=4 sts=4