-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm using HTMLPurifier in a current project and I'm not sure about the most efficient way to go about handling multiple configs. For the most part the only major thing changing is the allowed tags.
Currently I have a private method, in each class using HTMLPurifier, that gets called when a config…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I want to only allow the span element only when it has a certain class in htmlpurifier
does anyone know how to do this, right now I have
$config->set('HTML.Allowed','a[href],p,ol,li,ul,img[src],blockquote,em,span[class]');
$config->set('Attr.AllowedClasses',"allowed");
but that allows…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I want to only allow the span element only when it has a certain class in htmlpurifier
does anyone know how to do this, right now I have
$config->set('HTML.Allowed','a[href],p,ol,li,ul,img[src],blockquote,em,span[class]');
$config->set('Attr.AllowedClasses',"allowed");
but that allows…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am processing a user input from the public with a javascript WYSIWYG editor and I'm planning on using htmlpurifier to cleanse the text.
I thought it would be enough to use htmlpurifier on the input, stored the cleaned input in the database,and then output it without further escaping/filtering.…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm trying to install HTML Purifier http://htmlpurifier.org/ but I get the following error Undefined variable: dirty_html. I was wondering how can I fix this problem?
Here is the PHP code.
require_once '../../htmlpurifier/library/HTMLPurifier.auto.php';
$config = HTMLPurifier_Config::createDefault();
…
>>> More