|
Snor
How do I remove all HTML comments?April 18, 2012 12:43AM |
Not sure if I am going crazy but I thought HTML Purifier used to remove all comments from the HTML by default?
Now it is not doing anyway, and I want to remove them.. all of them. There doesn't seem to be a setting to remove comments, and it doesn't happen by default.. so is this even possible??
(Basically some IE conditional comments are getting copied into a wysiwyg area from Word, and they're not getting removed...)
|
Re: How do I remove all HTML comments? April 18, 2012 12:54AM |
Admin Registered: 6 years ago Posts: 2,640 |
Did you change environments?
|
Snor
Re: How do I remove all HTML comments?April 18, 2012 10:21AM |
Thanks for the quick reply - after your assurances I looked for other causes and it seems to be caused by the fact that I had "HTML.Trusted" applied on this website in particular. I don't usually use this but it was actually required at some point and I don't quite remember why... haha :) Maybe there are some comments that need leaving in somewhere, but I see HTML Purifier has the option to do that now anyway - awesome! Will look into that further to see why it was set to Trusted, but I have another question or two now due to this :)
First, what does HTML.Trusted *actually* do - this doesn't seem to be documented properly, like the specifics of it.
Is it possible to have HTML.Trusted set while still removing comments? It seems like this directive does things that can't be override any other way - although maybe I would be better off building all the specific rules I need individually instead of using Trusted?
Thanks for the awesome software anyway, been using it for quite a while now for all sorts of stuff!
|
Re: How do I remove all HTML comments? April 18, 2012 05:17PM |
Admin Registered: 6 years ago Posts: 2,640 |
|
Re: How do I remove all HTML comments? March 13, 2013 11:32PM |
Registered: 2 months ago Posts: 3 |
|
Re: How do I remove all HTML comments? March 14, 2013 12:08AM |
Admin Registered: 6 years ago Posts: 2,640 |
The usual convention is to use PRE tags plus CDATA.
HTML Purifier, Standards-Compliant HTML Filtering