From ea1362ce5ce862a90737b15505d1f77e03906999 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Fri, 29 Jun 2007 15:43:23 +0000 Subject: [PATCH] [Phorum] Minor enhancements: add cache purge support and give a friendly HTML is on message above editor. git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1281 48356398-32a2-884e-a903-53898d9a118a --- plugins/phorum/htmlpurifier.php | 16 ++++++++++++++++ plugins/phorum/info.txt | 1 + 2 files changed, 17 insertions(+) diff --git a/plugins/phorum/htmlpurifier.php b/plugins/phorum/htmlpurifier.php index 9f780aaf..1fb2212e 100644 --- a/plugins/phorum/htmlpurifier.php +++ b/plugins/phorum/htmlpurifier.php @@ -47,6 +47,11 @@ function phorum_htmlpurifier_format($data) continue; } + if (isset($_GET['purge'])) { + // purge the cache + unset($message['meta']['body_cache']); + } + if ( isset($message['meta']['body_cache']) && isset($message['meta']['body_cache_serial']) && @@ -201,3 +206,14 @@ function phorum_htmlpurifier_before_editor($message) { return $message; } +function phorum_htmlpurifier_editor_after_subject() { + if (!empty($GLOBALS['PHORUM']['mod_htmlpurifier']['wysiwyg'])) return; + ?> + HTML input is on. Make sure you escape all HTML and + angled-brackets with &lt; and &gt; (you can also use CDATA + tags, simply wrap the suspect text with +<![CDATA[text]]>. Paragraphs will only be applied to +double-spaces; single-spaces will not generate <br> tags. +