I am using HTMLPurifier with an input textarea where users are allowed to put their HTML tag. Config is default:
$config = HTMLPurifier_Config::createDefault();
$purifier = new HTMLPurifier($config);
$_POST['txt'] = $purifier->purify($_POST['txt']);
The problem I am getting is when the users put some >
in the text, for example:
<p>Some text > other text </p>
This gets converted to:
<p>Some text > other text </p>
Is there any way to stop that conversion? Without doing the oblivious:
$_POST['txt'] = str_replace('>','>',$_POST['txt']);
If this conversion doesn't happen, the HTML will be invalid. If that's what you want, there may be a config option for that.