Page MenuHomePhabricator

Ugly span tags appear in Parsoid rendering of {{infobox book}}, but not in the saved wikitext, if ref tag is present
Closed, DeclinedPublic

Description

Span tag as seen in Firefox

https://en.wikipedia.org/wiki/Everyone_Poops?veaction=edit produces an ugly span tag above the infobox.

The infobox is not displaying correctly at all in Safari, but in both Firefox and Safari it shows a long, large, bold-face span tag. This appears to be caused by the <ref> tags. See https://en.wikipedia.org/w/index.php?oldid=625300040 for a single-parameter infobox that causes the mess.

These span tags are not saved, so they don't corrupt the wikitext.


Version: unspecified
Severity: normal

Attached:

Screen_Shot_2014-09-12_at_3.14.18_PM.png (554×1 px, 276 KB)

Details

Reference
bz70796

Event Timeline

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

Created attachment 16456
Infobox as seen in Safari. Note that the content of the box does not display in Safari. It's blank for half a screen, and then the article text begins.

Attached:

Screen_Shot_2014-09-12_at_3.14.52_PM.png (634×1 px, 227 KB)

This is just a buggy template / template use.

The wikitext on https://en.wikipedia.org/w/index.php?oldid=625300040 leads to the following template expansion for the infobox:

...
<span class="Z3988"

title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Everyone+Poops<ref name="bnn">{{cite web|url=http://search.barnesandnoble.com/Everyone-Poops/Taro-Gomi/e/9780916291457|title=Everyone Poops, My Body Science Series, Taro Gomi, Book|accessdate=2008-02-14|year=2009|publisher=[[Barnes & Noble]]}}</ref>"></span

...

See how the span has a title attribute that has a ref tag and transclusion. But even that brokenness is okay .. the real problem is the use of double quotes for the name attribute of the <ref> tag that is embedded in the title attribute.

So, the wikitext is effectively something like this:

<span title="....name="bnn"..."</span>

That is broken because of the use of double quotes which terminates the title attribute early. This is one of those edge-case differences between PHP parser and Parsoid. If the name="bnn" is replaced with name='bnn', this will work.

This is a wontfix on the Parsoid end since there is a wikitext edit that will handle this strange edge case.

Please reopen if there is something to do on the Parsoid end.