Reputation: 57956
I am making use of the following HTML tags and when I pass it through tidy and view the HTML output those tags have been removed. I have had a look at the list of config options but I can't find one that prevents this from happening.
Tidy removes: unsubscribe
and webversion
.
How can I get it to keep HTML tags like these?
Upvotes: 0
Views: 1191
Reputation: 9567
PHP Tidy is aimed at correcting HTML and those tags aren't valid. Through correct configuration of php tidy you might be able to add them.
If I guessd correctly those should be blocklevel elements read how to add them here or see all of the other options.
Upvotes: 1
Reputation: 360772
Those aren't valid HTML tags, so Tidy will remove them. You might have to massage the text before/after to 'hide' the tags, by changing them to [unsubscribe] and [webversion], possibly, then change back to the <>
versions afterwards. Another option would be to process the file as XML, which allows arbitrary tags of that sort. However, you'd have to be producing valid XHTML to begin with, or tidy could nuke other parts of your document.
Upvotes: 0