Page MenuHomePhabricator

A multiline HTML comment after a heading leads to the wikitext line being sent through as plain text
Closed, ResolvedPublic

Description

For an example see:
https://en.wikipedia.org/wiki/User:Amire80/heading-comment?veaction=edit

There is an HTML comment that begins after a heading.

This page is rendered correctly, but in the VE the heading is displayed incorrectly and there is a line break character after it.

This is a rather esoteric case, but such comments do happen. They are used in GSoC templates among other things; for an example see the "Deliverables" section heading at
https://www.mediawiki.org/w/index.php?title=User:Vikassy/GSoC14&oldid=931677


Version: unspecified
Severity: normal

Details

Reference
bz62834

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:02 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz62834.

Input wikitext:

==Foo==<!--Bar-->
Baz
==Foo==<!--
Bar-->
Baz

Output Parsoid HTML:

<h2 data-parsoid="…">Foo</h2><!--Bar-->
<p data-parsoid="…">Baz</p>
<p data-parsoid="…">==Foo==<!--
Bar-->
Baz</p>

Possibly related to bug 60829?

Change 120952 had a related patch set uploaded by Subramanya Sastry:
(Bug 62834) Accept multi-line comments in inline_breaks check

https://gerrit.wikimedia.org/r/120952

Change 120952 merged by jenkins-bot:
(Bug 62834) Accept multi-line comments in inline_breaks check

https://gerrit.wikimedia.org/r/120952