Page MenuHomePhabricator

BlockLevelPass matches "<track" to "<tr", causing missing <p> tags
Closed, ResolvedPublic

Description

Found while investigating a paragraph level issue in T100106#3277569 -- presence of an HTML "track" element in a "video" element triggers the check for "<tr" in BlockLevelPass::execute. This can cause a wikitext paragraph containing a video (in video.js mode, which doesn't use a wrapper div) to be treated as not needing "<p>...</p>" wrapped around it.

Result is that there is no line break between the two lines in an example like:

this is line one [[File:Folgers.ogv]] yay

this is line two [[File:Folgers.ogv]] yay

Inserting a \b into the regexes seems to resolve this.

Event Timeline

brion created this task.May 19 2017, 10:13 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 19 2017, 10:13 PM
TheDJ added a subscriber: TheDJ.May 19 2017, 10:23 PM

Change 354607 had a related patch set uploaded (by Brion VIBBER; owner: Brion VIBBER):
[mediawiki/core@master] Add \b to regexes in BlockLevelPass to avoid confusing tr & track

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

Change 354607 merged by jenkins-bot:
[mediawiki/core@master] Add \b to regexes in BlockLevelPass to avoid confusing tr & track

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

TheDJ closed this task as Resolved.May 20 2017, 1:04 PM
TheDJ assigned this task to brion.
TheDJ edited projects, added Wikimedia-Hackathon-2017; removed Patch-For-Review.