Page MenuHomePhabricator

Rendering difference in badly nested formatting elements and links
Closed, DeclinedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

$ echo "[http://example.com foo'''] bar'''" | php maintenance/run parse
<p><a rel="nofollow" class="external text" href="http://example.com">foo<b></b></a><b> bar</b>
</p>

$ echo "[http://example.com foo'''] bar" | php maintenance/run parse --parsoid
<section data-mw-section-id="0" id="mwAQ"><p id="mwAg"><a rel="mw:ExtLink nofollow" href="http://example.com" class="external text" id="mwAw">foo<b id="mwBA"></b></a> bar</p>

For wikilinks, however:

$ echo "[[plop|aaa''']] aaa" | php ./maintenance/run parse.php
<p><a href="/wiki/Plop" title="Plop">aaa<b></b></a> aaa

$ echo "[[plop|aaa''']] aaa" | php ./maintenance/run parse.php --parsoid
<section data-mw-section-id="0" id="mwAQ"><p id="mwAg"><a rel="mw:WikiLink" href="http://localhost/wiki/Plop" title="Plop" id="mwAw">aaa<b id="mwBA"></b></a> aaa</p>

What happens?:

Observe that the Legacy parser "bar" after the external link is bold, whereas it's not in Parsoid. This also means that a ''' formatting element after the link will have the opposite effect in both parsers.

This behaviour is also not consistent depending on the link type: for Wikilinks, the formatting element is stopped at the link boundary on both parsers.

What should have happened instead?:

Formatting elements in links should be consistent between the parsers and between external and wikilinks.

Note
Detected on visualdiff on https://ang.wiktionary.org/wiki/Br%C5%ABcendm%C5%8Dtung:%D7%9C%D7%A2%D7%A8%D7%99_%D7%A8%D7%99%D7%99%D7%A0%D7%94%D7%90%D7%A8%D7%98

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The example page text appears to be appropriately identified as having missing end tags in linter.