Last modified: 2014-08-24 08:49:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71791, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69791 - Comments after === became a part of a header in xml representation
Comments after === became a part of a header in xml representation
Status: UNCONFIRMED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.24rc
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-20 17:28 UTC by Nikolay Shaplov
Modified: 2014-08-24 08:49 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nikolay Shaplov 2014-08-20 17:28:32 UTC
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.
Comment 1 Nikolay Shaplov 2014-08-24 08:49:02 UTC
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>

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links