HTML Purifier Phorum Mod: enable WYSIWYG
Posted by Ambush Commander
HTML Purifier Phorum Mod: enable WYSIWYG June 28, 2007 10:36PM |
Registered: 16 years ago Posts: 43 |
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 04:46PM by Ambush Commander.
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 04:46PM by Ambush Commander.
Re: HTML Purifier Phorum Mod: enable WYSIWYG June 29, 2007 04:42PM |
Registered: 16 years ago Posts: 43 |
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
HTML Purifier, standards-compliant HTML filtering
July 30, 2007 08:19PM |
Admin Registered: 22 years ago Posts: 4,495 |
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 30, 2007 08:25PM |
Registered: 16 years ago Posts: 43 |
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
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
July 30, 2007 08:35PM |
Admin Registered: 22 years ago Posts: 4,495 |
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 30, 2007 08:37PM |
Registered: 16 years ago Posts: 43 |
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
HTML Purifier, standards-compliant HTML filtering
Re: HTML Purifier Phorum Mod: enable WYSIWYG January 09, 2008 01:35AM |
Registered: 15 years ago Posts: 1 |
Re: HTML Purifier Phorum Mod: enable WYSIWYG January 09, 2008 05:13PM |
Registered: 16 years ago Posts: 43 |
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
HTML Purifier, standards-compliant HTML filtering
Re: HTML Purifier Phorum Mod: enable WYSIWYG January 12, 2008 11:22PM |
Registered: 16 years ago Posts: 43 |
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
HTML Purifier, standards-compliant HTML filtering
Re: HTML Purifier Phorum Mod: enable WYSIWYG January 13, 2008 12:39AM |
Registered: 16 years ago Posts: 43 |
Updated module can be downloaded here: [www.phorum.org]
HTML Purifier, standards-compliant HTML filtering
HTML Purifier, standards-compliant HTML filtering
Sorry, only registered users may post in this forum.