Welcome! » Log In » Create A New Profile

Doctype-wise list of unsupported elements

Posted by patnaik 
Doctype-wise list of unsupported elements
August 06, 2007 05:23PM

It would be useful to have a doctype-wise list of unsupported tags - HTML elements that are not in the default white-list. Many would use HTMLPurifier in the default configuration (for a particular doctype), and may mistakenly assume that all elements that are valid for the doctype will pass through the filter.

PS: In the documentation, it is not clear if and when such tags would be supported. As a majority of HTML tags are supported, one expects implementation for the remaining few.

Re: Doctype-wise list of unsupported elements
August 07, 2007 01:18AM

While there is not currently a resource that exactly caters to this request, I think that print definition, which prints a list of all supported elements, attributes and noodles of other useful information, should be sufficient. You can specify which doctype you want in the configuration options on the page.

I don't have the inverse: which elements are not supported, but that can be easily done, if that's what you'd like.

Re: Doctype-wise list of unsupported elements
August 07, 2007 05:29AM

Yes, having the inverse readily available would really help. But having that through print.definition.php may be unnecessarily complex. Few words like this in the right readme file would be simpler and easier to find:

Following tags are not yet supported: XHTML 1.0 Strict - embed, form, input, object, param, embed... HTML 4.0 - embed, form... ...

Re: Doctype-wise list of unsupported elements
August 07, 2007 05:50AM

Here is some information I collected.

Unsupported HTML elements* (filtered out by HTMLPurifier 2.1.1) HTML 4, Transitional: area, button, fieldset, form, input, label, legend, object, optgroup, option, param, rt, rb , rp, rt, ruby, script, select, textarea HTML 4, Strict: area, button, center, fieldset, form, input, label, legend, object, optgroup, option, param, rt, rb , rp, rt, ruby, s, script, select, strike, textarea XHTML 1, Transitional: area, button, fieldset, form, input, label, legend, object, optgroup, option, param, rt, rb , rp, rt, ruby, script, select, textarea XHTML 1, Strict: area, button, center, fieldset, form, input, label, legend, object, optgroup, option, param, rt, rb , rp, rt, ruby, s, script, select, strike, textarea XHTML 1.1: area, button, center, fieldset, form, input, label, legend, object, optgroup, option, param, rb , s, script, select, strike, textarea* elements of XHTML 1, strict

Re: Doctype-wise list of unsupported elements
August 07, 2007 12:43PM
Few words like this in the right readme file would be simpler and easier to find: [snip]

Probably. But the stuff at printDefinition.php comes right from the source, so it would always be up-to-date.

Unsupported HTML elements [snip]

You really can't base your "full" list off of XHTML 1.1 Strict, because it introduces a few new elements that are not supported in the previous doctypes, namely <ruby>. Also, <rb>, <s> and <strike> are supported.

Re: Doctype-wise list of unsupported elements
August 07, 2007 02:44PM
<rb>, <s> and <strike> are supported

The HTMLDefinition 'Elements ($info) - allowed tags,' e.g., for doctype XHTML 1.0 Strict, does not show those tags, so I assumed they are not supported.

Re: Doctype-wise list of unsupported elements
August 07, 2007 11:33PM

Well, of course they're not "supported" in XHTML 1.0 Strict: they're deprecated!

Sorry, you do not have permission to post/reply in this forum.