|
Allow ndash; December 20, 2007 03:21AM |
Registered: 5 years ago Posts: 1 |
Hello! Great software, really. Been using it for a couple of sites now.
To my question, how do I make the purifier allow – (ndash) character?
I use the following code:
public function purify($text)
{
$config = HTMLPurifier_Config::createDefault();
$config->set('Core', 'EscapeInvalidTags', 'true');
$config->set('Core', 'Encoding', 'ISO-8859-1');
$purifier = new HTMLPurifier( $config ) ;
$html = $text;
$html = $purifier->purify($html) ;
return $html;
}
|
Re: Allow ndash; December 20, 2007 05:18PM |
Admin Registered: 6 years ago Posts: 2,632 |
Please see this article on UTF-8. Specifically, %Core.EscapeNonASCIICharacters is what you want.