May 7th, 2002

zechs

cleanhtml.pl Question: DIV and SPAN in comments?

This question has bugged me for a while, and I finally decided to ask it.

Why aren't <DIV> and <SPAN> allowed in comments?

(i.e. Why aren't they included in @comment_close or @comment_all?)

Is there some security concern with these elements that I'm not aware of? Or a browser compatibility issue?

I use <DIV> and <SPAN> frequently, especially in conjunction with the style attribute and CSS properties, to format text and group other elements, and I often find myself attempting to use them in comments before remembering that they're not allowed.

Just wondering what the reasoning behind this is. Thanks.