Just discovered this issue in the Code filter issue queue: http://drupal.org/node/32218

If Code filter comes after Line break converter (as it does on d.o.), then the <div class="codeblock"> blocks are enclosed by <p> paragraph tags. Which is obviously invalid XHTML code.

For example, look at the source code on this page.

print "note the erroneous <p> tags that surround this div";

Comments

vm’s picture

Queue cleanup.

John is this still an issue on d.o over a year later?

avpaderno’s picture

Title: input filtering order causes invalid XHTML » Input filtering order causes invalid XHTML

It is still a problem.
Looking at the source code of this page, I see

<p><div class="codeblock">[code]<span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">print </span><span style="color: #DD0000">"note the erroneous &lt;p&gt; tags that surround this div"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></span>[/code]</div></p>
avpaderno’s picture

The solution seems quiet easy.

rfay’s picture

Is this still valid? Since we obviously can get things done now on d.o we should fix this...

rfay’s picture

johnalbin’s picture

Status: Active » Closed (fixed)

I just viewed source on this page and am no longer seeing invalid html. Instead I see:

<p></p><div class="codeblock">

Perhaps the HTML Corrector is fixing it now. Anyway, closing this 5 year old issue. yay!