mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 16:31:53 +00:00
[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
This commit is contained in:
parent
cff498ef67
commit
ea1362ce5c
@ -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;
|
||||
?><tr><td colspan="2" style="padding:1em 0.3em;">
|
||||
HTML input is <strong>on</strong>. 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[<em>text</em>]]>. Paragraphs will only be applied to
|
||||
double-spaces; single-spaces will not generate <tt><br></tt> tags.
|
||||
</td></tr><?php
|
||||
}
|
||||
|
||||
|
@ -3,5 +3,6 @@ hook: quote|phorum_htmlpurifier_quote
|
||||
hook: posting_custom_action|phorum_htmlpurifier_posting
|
||||
hook: common|phorum_htmlpurifier_common
|
||||
hook: before_editor|phorum_htmlpurifier_before_editor
|
||||
hook: tpl_editor_after_subject|phorum_htmlpurifier_editor_after_subject
|
||||
title: HTML Purifier Phorum Mod
|
||||
desc: This module enables standards-compliant HTML filtering on Phorum. Please check migrate.bbcode.php before enabling this mod.
|
Loading…
Reference in New Issue
Block a user