Page MenuHomePhabricator

Comments after === became a part of a header in xml representation
Open, LowPublic

Description

Author: dhyan

Description:
When I do preparsing of the following text

Some text
===<!-- Comment written this way ===
And a new line after the end of the comment-->

It gives me a level 1 header with = as a title (what is expected), but it also
put a comment inside of <h></h> tags:

<root>Some text
<h level="1" i="1">===<comment>&lt;!-- Comment written this way ===
And a new line after the end of the comment--&gt;</comment></h>
</root>

This is not a problem for web rendering since comments are simply removed, but
if one will try to create some ObjModel from the result xml, it would be not
exactly the result that person would expect. And there might be some other
unexpected results. i.e. some code would expect to find = before </h> tag, and
would be surprised when it does not find it there. Etc.


Version: 1.24rc
Severity: minor

Details

Reference
bz69791

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:28 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz69791.
bzimport added a subscriber: Unknown Object (MLST).

dhyan wrote:

Might be good to note that comments after normal headers are also put inside <h> tags:

Header =<!--Comment-->

<root><h level="1" i="1">= Header =<comment>&lt;!--Comment--&gt;</comment></h></root>