I have found an issue in this question: https://stackoverflow.com/questions/491566/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: <code><pre>hello</pre></code> 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.