Page MenuHomePhabricator

<del> tag with multi-paragraph content improperly handled by parser
Closed, DuplicatePublic

Description

If some multi-paragraph text is stroke using <del>...</del> tags and enclosed into a <div> section, the HTML code generated by parser is incorrect. Parser extends range of the <del> section to the end of <div>.

This works fine, when stroke text is outside any div.

The workaround is to add an extra unbalanced </del> to the wikicode. However I doubt this is a right workaround as this may cause problems for wikicode parsers like VE.

Examples shown here:
https://commons.wikimedia.org/wiki/User:Ankry/test

Problem appeared on talk pages when deleted (stroke) content contains multi-paragraph templates.

Event Timeline

Ankry created this task.Feb 12 2018, 1:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 12 2018, 1:11 PM
Ankry updated the task description. (Show Details)Feb 15 2018, 5:44 PM

This is just another instance of T134469: doBlockLevels() inserts <p> and </p> randomly with no regard for HTML validity and where Tidy then comes along and does its own thing, and I am going to merge this ticket into that.

In any case, Tidy is being replaced by RemexHtml by end June, and when that happens, it will render all 3 examples identically where only the first line is deleted, and the next 2 lines are not! You can verify that by testing this on mediawiki.org

Or, you can look at Parsoid's output @ https://commons.wikimedia.org/api/rest_v1/page/html/User:Ankry%2Ftest which Remex will match.