diff options
author | Zach Copley <zach@status.net> | 2010-02-24 16:52:16 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-02-24 16:52:16 -0800 |
commit | 10884dcd49da8db1fcca3cbbef0f85869d43520e (patch) | |
tree | 7c8376ed6cea7c971faacaa6e223a670d0e6481f /extlib/HTMLPurifier/HTMLPurifier.kses.php | |
parent | 543ff40ef62f2587cde084b03bcf2e956f52ce2f (diff) | |
parent | 5173d92895e892412e8a8c10b4e434c924593c99 (diff) |
Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline:
Merge StatusNet core localization updates from 0.9.x branch
Fix update_po_templates.php to support the plural and context variants of _m() in plugins
Drop HTMLPurifier; we don't need its extra capabilities and we're already using htmLawed which is lighter-weight.
OStatus: handle update-profile Salmon pings
Revert "Updated jQuery Form Plugin from v2.17 to v2.36"
OStatus: disable HTMLPurify cache unless we've configured a writable path for it.
Diffstat (limited to 'extlib/HTMLPurifier/HTMLPurifier.kses.php')
-rw-r--r-- | extlib/HTMLPurifier/HTMLPurifier.kses.php | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/extlib/HTMLPurifier/HTMLPurifier.kses.php b/extlib/HTMLPurifier/HTMLPurifier.kses.php deleted file mode 100644 index 3143feb17..000000000 --- a/extlib/HTMLPurifier/HTMLPurifier.kses.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/** - * @file - * Emulation layer for code that used kses(), substituting in HTML Purifier. - */ - -require_once dirname(__FILE__) . '/HTMLPurifier.auto.php'; - -function kses($string, $allowed_html, $allowed_protocols = null) { - $config = HTMLPurifier_Config::createDefault(); - $allowed_elements = array(); - $allowed_attributes = array(); - foreach ($allowed_html as $element => $attributes) { - $allowed_elements[$element] = true; - foreach ($attributes as $attribute => $x) { - $allowed_attributes["$element.$attribute"] = true; - } - } - $config->set('HTML.AllowedElements', $allowed_elements); - $config->set('HTML.AllowedAttributes', $allowed_attributes); - $allowed_schemes = array(); - if ($allowed_protocols !== null) { - $config->set('URI.AllowedSchemes', $allowed_protocols); - } - $purifier = new HTMLPurifier($config); - return $purifier->purify($string); -} - -// vim: et sw=4 sts=4 |