Last modified: 2011-04-14 15:10:36 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 T25698, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23698 - html comment at begin of page leaves newline
html comment at begin of page leaves newline
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-28 17:01 UTC by Umherirrender
Modified: 2011-04-14 15:10 UTC (History)
3 users (show)

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


Attachments

Description Umherirrender 2010-05-28 17:01:18 UTC
The html comment at the begin of a page, leaves a newline and this newline can produce a paragraf.

The wikitext:

<!--comment--><newline>
<newline>
text

produce a paragraf at the top of page and is parsed the same way than

<newline>
<newline>
text

But it better to parse it like

<newline>
text

and produce no paragraf.

Thanks.
Comment 1 Platonides 2010-05-28 17:10:01 UTC
Looks like expected behavior to me.
I see your point, but there's probably some case where that newline shouldn't be stripped.
Comment 2 Umherirrender 2010-10-23 19:43:03 UTC
I have found in Preprocessor_DOM.php:

TODO: This could theoretically be done if $wsStart == 0, i.e. for comments at the overall start. That's not how Sanitizer::removeHTMLcomments() did it, but it's a possible beneficial b/c break.
Comment 3 db [inactive,noenotif] 2010-12-03 20:26:25 UTC
looks related: bug 4161
Comment 4 Mark A. Hershberger 2011-01-22 04:05:21 UTC
*** Bug 26645 has been marked as a duplicate of this bug. ***

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


Navigation
Links