I have found an issue in this question: How to get list of values in GROUP_BY clause?
Check this out. I enter the following piece of HTML:
<code><pre>hello</pre></code>
It is rendered as such:
hello
When I check the rendered HTML in my browser, what I get is this:
<p><code></code></p>
<pre><code>hello</code></pre>
So some extra <code/>
element and paragraph are rendered.
<pre><code>hello</code></pre>
without anything before it. Your source document would be invalid in XHTML (incorrect containment according to XML schema of HTML), but it is valid in HTML4 and HTML5 where tags don't have to be closed, but where tags are implied according to the mandatory schema.