HTMLPurifier 4.4.0
/home/ezyang/Dev/htmlpurifier/plugins/phorum/htmlpurifier.php File Reference

Go to the source code of this file.

Functions

 phorum_htmlpurifier_format ($data)
 HTML Purifier Phorum Mod.
 phorum_htmlpurifier_generate_sig ($row)
 Generates a signature based on a message array.
 phorum_htmlpurifier_generate_editmessage ($row)
 Generates an edit message based on a message array.
 phorum_htmlpurifier_remove_sig_and_editmessage (&$row)
 Removes the signature and edit message from a message.
 phorum_htmlpurifier_posting ($message)
 Indicate that data is fully HTML and not from migration, invalidate previous caches.
 phorum_htmlpurifier_quote ($array)
 Overload quoting mechanism to prevent default, mail-style quote from happening.
 phorum_htmlpurifier_common ()
 Ensure that our format hook is processed last.
 phorum_htmlpurifier_before_editor ($message)
 Pre-emptively performs purification if it looks like a WYSIWYG editor is being used.
 phorum_htmlpurifier_editor_after_subject ()

Function Documentation

phorum_htmlpurifier_before_editor ( message)

Pre-emptively performs purification if it looks like a WYSIWYG editor is being used.

Definition at line 235 of file htmlpurifier.php.

References $GLOBALS, $purifier, and HTMLPurifier::getInstance().

phorum_htmlpurifier_common ( )
phorum_htmlpurifier_editor_after_subject ( )

Definition at line 251 of file htmlpurifier.php.

References $config, $GLOBALS, $purifier, and HTMLPurifier::getInstance().

phorum_htmlpurifier_format ( data)

HTML Purifier Phorum Mod.

Filter your HTML the Standards-Compliant Way!

This Phorum mod enables users to post raw HTML into Phorum. But never fear: with the help of HTML Purifier, this HTML will be beat into de-XSSed and standards-compliant form, safe for general consumption. It is not recommended, but possible to run this mod in parallel with other formatters (in short, please DISABLE the BBcode mod).

For help migrating from your previous markup language to pure HTML please check the migrate.bbcode.php file.

If you'd like to use this with a WYSIWYG editor, make sure that editor sets $PHORUM['mod_htmlpurifier']['wysiwyg'] to true. Otherwise, administrators who need to edit other people's comments may be at risk for some nasty attacks.

Tested with Phorum 5.2.11. Purifies a data array

Definition at line 31 of file htmlpurifier.php.

References $data, $GLOBALS, $PHORUM, $purifier, HTMLPurifier::getInstance(), phorum_htmlpurifier_migrate(), and phorum_htmlpurifier_remove_sig_and_editmessage().

phorum_htmlpurifier_generate_editmessage ( row)

Generates an edit message based on a message array.

Definition at line 144 of file htmlpurifier.php.

References $GLOBALS, and $PHORUM.

Referenced by phorum_htmlpurifier_remove_sig_and_editmessage().

phorum_htmlpurifier_generate_sig ( row)

Generates a signature based on a message array.

Definition at line 129 of file htmlpurifier.php.

Referenced by phorum_htmlpurifier_remove_sig_and_editmessage().

phorum_htmlpurifier_posting ( message)

Indicate that data is fully HTML and not from migration, invalidate previous caches.

Note:
This function could generate the actual cache entries, but since there's data missing that must be deferred to the first read

Definition at line 181 of file htmlpurifier.php.

References $GLOBALS, and $PHORUM.

phorum_htmlpurifier_quote ( array)

Overload quoting mechanism to prevent default, mail-style quote from happening.

Definition at line 191 of file htmlpurifier.php.

References $GLOBALS, $PHORUM, $purifier, and HTMLPurifier::getInstance().

phorum_htmlpurifier_remove_sig_and_editmessage ( &$  row)

Removes the signature and edit message from a message.

Parameters:
$rowMessage passed by reference

Definition at line 163 of file htmlpurifier.php.

References phorum_htmlpurifier_generate_editmessage(), and phorum_htmlpurifier_generate_sig().

Referenced by phorum_htmlpurifier_format().