Quote from: Ambush at Sep 06, 2006, 10:37 PM
Yep, forgot that. HTML Purifier has sort-of out-of-the-box support for multiple character encodings:
$config = HTMLPurifier_Config::createDefault();
$config->set(’Core’, ’Encoding’, ’ISO-8859-1’);
$purifier = new HTMLPurifier($config);
Thanks a LOT for this one !
Quote from: AmbushBut you really should be using UTF-8.
Yeah I know, I usually use UTF-8, but MODx ships with Latin1 for french, though we have an utf-8 mod somewhere.
Quote from: AmbushAs for the
versus <p> tag thing, that’s TinyFCK’s fault, not HTML Purifier’s. Textile wouldn’t have preserved the formatting. ;-) On my end, there is some Microsoft-specific behavior HTML Purifier has to filter out. This is projected for the 1.2.
Textile would have, but it’s only normal since Textile is not WYSIWYG when you copy-paste it’s raw text. Anyway, I didn’t mean to imply htmlpurifier was at fault there. Microsoft has always made a mess of importing office docs into html pages... I don’t care one bit if MS document imports end up with
tags instead of p’s.
I must say, I am really impressed by the htmlpurifier, and I will use it ! I am tired of waiting for the semantically sound wysiwyg editor, now I have an alternate solution : thanks for that !!!
One thing I was worried about was the added time to process the document, and server load, but I must say I almost don’t see any difference between normal document save and "processed" document save (maybe because I have a nice dedicated server, but nevertheless).
Anyway, if you have a donation page, I’ll drop a few bucks to show my appreciation, this plugin will save me a lot of cleaning up
Thanks again for the quick response time and great code
Edit : Your code works perfectly