Firefox PHP

HTML Purifier Phorum Mod: enable WYSIWYG

Posted by Ambush Commander 
HTML Purifier Phorum Mod: enable WYSIWYG
June 29, 2007 04:36AM
HTML Purifier Phorum Module

Filter Your HTML the Standards-Compliant Way!

This is my first attempt at a Phorum module, but I have made every effort to make sure that it is as bug free as possible.

The HTML Purifier Phorum Module is a module that enables raw HTML input into the forums. "Now wait!" you may be thinking, "Doesn't that pose a security risk?" Normally, yes, it would, but we are using a spiffy library (written by me) called HTML Purifier that has bullet-proof XSS protection due to its whitelist implementation. With HTML Purifier protecting your user-data, you are sure to be safe.

For plain-textarea users, we offer auto-paragraphing and linkification, so editing raw HTML is much more pleasant than normal. However, the real important thing is that HTML Purifier will enable you to embed a WYSIWYG editor with impunity! This functionality doesn't come preloaded, since I don't know what WYSIWYG editor you want to use, but that's where this library really shines. Users will be able to post lists and tables with HTML Purifier enabled!

Be sure to follow the instructions in htmlpurifier/migrate.bbcode.php to migrate your Phorum database to HTML.

Download:
- HTML Purifier Phorum Mode 2.0.1.1 (ZIP)
- HTML Purifier Phorum Mode 2.0.1.1 (TAR.GZ)

Demo: This mod is enabled on HTML Purifier's forums, you can test it out anonymously in the special Test forum

Changelog:
- 2.0.1.1: Hammered out a few more quirks regarding signatures and edit messages. You can now migrate your users signatures to HTML with one click on the Settings page, please do so if you disabled BBCode.

HTML Purifier, standards-compliant HTML filtering



Edited 4 time(s). Last edit at 06/29/2007 10:46PM by Ambush Commander.
Re: HTML Purifier Phorum Mod: enable WYSIWYG
June 29, 2007 10:42PM
Updated to 2.0.1.1. The new version is a lot better in terms of stability, so please upgrade to it.

HTML Purifier, standards-compliant HTML filtering
Re: HTML Purifier Phorum Mod: enable WYSIWYG
July 31, 2007 02:19AM
Hmm, tried this on dev.phorum.org and got:
Strict Standards: Non-static method HTMLPurifier_ConfigSchema::define() should not be called statically in 
/www/dev.phorum/phorum5-test/mods/htmlpurifier/htmlpurifier/HTMLPurifier/DoctypeRegistry.php
 on line 11

Strict Standards: Non-static method HTMLPurifier_ConfigSchema::instance() should not be called statically in
/www/dev.phorum/phorum5-test/mods/htmlpurifier/htmlpurifier/HTMLPurifier/ConfigSchema.php
 on line 109

Fatal error: Call to undefined function ctype_alnum() in
/www/dev.phorum/phorum5-test/mods/htmlpurifier/htmlpurifier/HTMLPurifier/ConfigSchema.php
on line 175

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: HTML Purifier Phorum Mod: enable WYSIWYG
July 31, 2007 02:25AM
Mmm... why is ctype support disabled?

To get rid of the E_STRICT warnings, replace the packaged HTML Purifier with the -strict version that you can download from the website.

HTML Purifier, standards-compliant HTML filtering
Re: HTML Purifier Phorum Mod: enable WYSIWYG
July 31, 2007 02:35AM
Gentoo does not compile with ctype by default. That I could deal with. I was more worried about the strict errors. Is there a reason you have a strict and a non-strict version?

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: HTML Purifier Phorum Mod: enable WYSIWYG
July 31, 2007 02:37AM
To maintain PHP4 compatibility (static keywords are not recognized by PHP4). Our deprecation cycle is synchronized with PHP's, so support will be dropped this December.

HTML Purifier, standards-compliant HTML filtering
Re: HTML Purifier Phorum Mod: enable WYSIWYG
January 09, 2008 07:35AM
Hi Ambush Commander.

I've been using your HTML Purifier for a while now (thanks for the amazing work!) and am now adding Phorum 5.2 to my site and was wondering whether you had updated your HTML Purifier Phorum Mod to work with this latest 5.2 version?

Thanks in advance.
Re: HTML Purifier Phorum Mod: enable WYSIWYG
January 09, 2008 11:13PM
Unfortunately, I have not yet, because until recently, the 5.2 series was beta. Now that it is stable, I will look into compatibility. Thank you for the heads up. If you attempt to use the mod on 5.2, please share your experiences. Thanks!

HTML Purifier, standards-compliant HTML filtering
Re: HTML Purifier Phorum Mod: enable WYSIWYG
January 13, 2008 05:22AM
Hi, I upgraded my forum to 5.2.6 and noticed some problems with the module (mainly with the migration code--regular usage doesn't seem to be affected). I'll be re-releasing the update module soon. Thanks!

HTML Purifier, standards-compliant HTML filtering
Re: HTML Purifier Phorum Mod: enable WYSIWYG
January 13, 2008 06:39AM
Updated module can be downloaded here: [www.phorum.org]

HTML Purifier, standards-compliant HTML filtering
Sorry, only registered users may post in this forum.

Click here to login