Lawrence @ Rogers wrote:

> <div/> and <p/> may pass the validator, but that is most certainly a
> bug. A quick look through the XHTML 1.0 DTD's reveals only ten tags
> that may be closed using the short form, and I am unable to find any
> documentation on the W3C web site to support anything otherwise.
> 
> <area />
> <base />
> <br />
> <col />
> <hr />
> <img />
> <input />
> <link />
> <meta />
> <param />
> 
> Using any other shorthandled elements would result in HTML rendering
> engines choking and giving unpredictable results.

I'm not so sure - I think relatively modern renderers are quite capable
of dealing with both <div/> and <p/> without causing any problems. 
<p/> instead of <p></p> is not unusual. 

> What I was suggesting is that your belief is flawed because your test
> was flawed itself. No e-mail will ever be just <head></head>. Ignoring
> the fact that a <title> tag is required as a minimum (although many
> e-mails probably omit it), the <head/> form is invalid as well.

Accepted, but it doesn't change the problem in html_eval_tag() - the
code doesn't attempt to validate html, it just does a simple regex
check for a balanced tag, but doesn't accept or ignore the short tag
version with no content.

> I believe that the behavior of HTML_TAG_BALANCE_HEAD is valid in this
> case, as <head/> is invalid HTML (despite what the validator says) and
> should not be used by anyone.

True, but html_eval_tag() will fire on _any_ short tag. 


/Per Jessen, Zürich

Reply via email to