[Bug] PHP Markdown (Extra) generates invalid HTML for code blocks
Michel Fortin
michel.fortin at michelf.com
Sun Sep 2 10:31:32 EDT 2007
Le 2007-09-02 à 10:23, Milian Wolff a écrit :
> PHP Markdown v 1.0.1i and PHP Markdown Extra v 1.1.5 generate
> invalid HTML for
> code blocks
>
> Take this input:
>
> paragraph
>
> codeblock
>
> Markdown will generate:
>
> <p>paragraph</p>
>
> <pre><code>codeblock
> </pre></code>
>
> Notice the wrong position of the closing code tag.
Oh my! That's a typing error, and it did not fail the testsuite!
I said previously that the HTML normalizer in MDTest wasn't quite
optimal (although better than Tidy) and that's why: it doesn't catch
this kind of misnested tags. Otherwise I'd have got failed tests
everywhere. Perhaps it's time MDTest uses its own stricter HTML
parser instead of the too forgiving parser in PHP 5.
I'll fix that promptly, thanks for that report.
Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
More information about the Markdown-Discuss
mailing list