From e901d832ab47e72b7803ff6f5b5db9adae7dde41 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Tue, 17 Jun 2008 03:41:40 +0000 Subject: [PATCH] Update Modx plugin to work with HTML Purifier 3.1.0. git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1801 48356398-32a2-884e-a903-53898d9a118a --- TODO | 2 -- plugins/modx.txt | 25 ++++++++++++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 40b1125f..ae733299 100644 --- a/TODO +++ b/TODO @@ -14,8 +14,6 @@ afraid to cast your vote for the next feature to be implemented! - Investigate how early internal structures can be accessed; this would prevent structures from being parsed and serialized multiple times. - Figure out how to simultaneously set %CSS.Trusted and %HTML.Trusted (?) -- Merge bugfixes to PHP4 -- Upgrade Modx module for HTML Purifier 3.1 (HTMLPurifier.php -> HTMLPurifier.auto.php) - Built-in support for target="_blank" on all external links - Make Phorum hide emails - Implement SecureMunge for resources too diff --git a/plugins/modx.txt b/plugins/modx.txt index 21093151..ac889aeb 100644 --- a/plugins/modx.txt +++ b/plugins/modx.txt @@ -35,9 +35,7 @@ $e = &$modx->Event; if ($e->name == 'OnBeforeDocFormSave') { global $content; - set_include_path('../assets/plugins/htmlpurifier/library/' - . PATH_SEPARATOR . get_include_path()); - include_once 'HTMLPurifier.php'; + include_once '../assets/plugins/htmlpurifier/library/HTMLPurifier.auto.php'; $purifier = new HTMLPurifier(); static $magic_quotes = null; @@ -89,3 +87,24 @@ HTML Purifier properly like this: $config = HTMLPurifier_Config::createDefault(); $config->set('Core', 'Encoding', 'ISO-8859-1'); // or whatever encoding $purifier = new HTMLPurifier($config); + + + +5. Known Bugs + +'rn' characters sometimes mysteriously appear after purification. We are +currently investigating this issue. See: + + + +6. See Also + +A modified version of Jot 1.1.3 is available, which integrates with HTML +Purifier. You can check it out here: + + +X. Changelog + +2008-06-16 +- Updated code to work with 3.1.0 and later +- Add Known Bugs and See Also section -- 2.11.4.GIT