Page MenuHomePhabricator

Misnested <a> / <i> tags
Closed, DuplicatePublic

Description

This is the "Bug 2702: Mismatched <i>, <b> and <a> tags are invalid" parser test case.

$ echo "''[http://example.com text'']" | tests/parse.js --normalize
<body><p><i><a href="http://example.com">text<i></i></a></i></p></body>

The nesting of a <i> inside another <i> tag is... suboptimal.


Version: unspecified
Severity: normal

Event Timeline

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

This might be related to the general <a>/<i>/<b> issues in bug 47326 (or it might be its own thing).

There is also this test case:

!! test
External link containing double-single-quotes in text '' (bug 4598 sanity check)
!! wikitext
Some [http://example.com/ pretty ''italics'' and stuff]!
!! html
<p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
</p>
!! end

where we currently emit:

<p><i>Some <a href="http://example.com/">pretty <i>italics</i> and stuff</a>!</i></p>

again with the <i> nested inside the <i>.

Arlolra triaged this task as Medium priority.Nov 26 2014, 10:29 PM
Arlolra subscribed.

Change 371726 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] T65143: Stop shuttling link content through tree building as dom fragment tokens

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

Change 371726 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Stop shuttling link content through tree building as dom fragment tokens

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

Change 371726 abandoned by Arlolra:
Stop shuttling link content through tree building as dom fragment tokens

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