By Ledo2 on
Is there any method i could use, so only filtered html tags would be written to the database?
So when a user with only filtered html allowed tags would write some other html tags that are not on the allowed list for his role the tags would be removed from the content of the post and not just be invisible? And if we click edit they are still there.
But not java script based so it can be turned off.
Thanks for replys.
Comments
see the
see the http://drupal.org/project/htmlpurifier module.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
I see
Yes i tought this was it but i didn't do something right then.
I install the module and enable both options.
-HTML Purifier
-HTML Purifier (advanced)
Then i tested it in filtered html and write a post.
I use:
-Strip disallowed tags
with this allowed tags:
<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>And img tag was still written in the database for example.
Must i put these tags somewhere in Advanced configuration options for html purifier? Or should HTML purifier write only the tags listed in allowed html tags in database by defoult?
Thanks for answers.
htmlpurifier is a two step
htmlpurifier is a two step installation-- you don't mention the htmlpurifier library. Did you install it also?
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
Yes i did.
I download it and put only the libary folder in root of purifier module.
I will try to play with it tomorow again but it would be good to know if purifier module should remove tags that are not on alowed list by defolt when is turn on or shoud i put tags somewhere in the advance setup area for each html tag i want to be removed.
Thanks for replie.