Page 1 of 1

Bug <PRE

Posted: Sun Aug 10, 2014 3:51 am
by roedygr
If there is a <PRE section inside a <p>...</p> HTMLValidator will complain the <p> are unbalanced.

I am not sure if PRE is supposed to be allowed in <p>, but if it is not, the error message should say "<PRE must not be nested inside <P>...</P>", not "<P> unbalanced".

Re: Bug <PRE

Posted: Mon Aug 11, 2014 9:09 am
by Albert Wiersch

The <pre> tag implies a </p> end tag so p is ended at that point. This is allowed so it's not an error and there is no message to generate. When it gets to the explicit </p> it sees that p is not open anymore and generates the error you are seeing.

It may be possible to improve the message by checking to see whether p was ended by implication and, if so, assume one was trying to put a "pre" element inside a "p" element.... so I will look into this improvement.


UPDATE: This has been improved for v15. If you'd like to try a v15 BETA, then please email or PM me.