|
wahyudinata
simple usage, no documentationsJanuary 10, 2008 06:21AM |
Hi all, This might sound ignorant but here it goes: My web app accepts the following: bla, bold, italics, strikethrough, underline
that's it, and of course it those can be nested. I have browsed htmlpurifier site, I cannot find any documentation to achieve this (or anything) for me to start at all?
Help me point to the right direction?
|
Re: simple usage, no documentations January 10, 2008 01:15PM |
Admin Registered: 6 years ago Posts: 2,652 |
You want to use the %HTML.Allowed setting.
|
wahyudinata
Re: simple usage, no documentationsJanuary 10, 2008 05:11PM |
|
Re: simple usage, no documentations January 10, 2008 05:25PM |
Admin Registered: 6 years ago Posts: 2,652 |
The information on how to set configuration options is in the INSTALL documentation. Anyway, for what you describe, you want this:
$config = HTMLPurifier_Config::createDefault();
$config->set('HTML', 'Allowed', 'a[href],b,i,s,u,p');
$purifier = new HTMLPurifier($config);
I added the p tag in my own discretion; otherwise users can't make paragraphs!
This is all documented in the INSTALL document.
|
wahyudinata
Re: simple usage, no documentationsJanuary 10, 2008 05:33PM |
wow, All these times I've been searching for documentation in http://htmlpurifier.org/#Docs, but it is in INSTALL. And after scouring the forums it seems that I am the only one having trouble finding it?
But this is more than enough to get me started, thanks for the prompt response Ambush Commander, *salutes*
|
Re: simple usage, no documentations January 10, 2008 05:34PM |
Admin Registered: 6 years ago Posts: 2,652 |
|
wahyudinata
Re: simple usage, no documentationsJanuary 10, 2008 05:50PM |
|
Re: simple usage, no documentations January 10, 2008 05:52PM |
Admin Registered: 6 years ago Posts: 2,652 |