Page MenuHomePhabricator

Don't generate fosterable content in tables
Closed, ResolvedPublic

Event Timeline

ssastry raised the priority of this task from to Medium.
ssastry updated the task description. (Show Details)
ssastry added a project: Parsoid.
ssastry subscribed.

Buggy wikitext markup of course .. but, Parsoid should not be generating fosterable output, if it can help it. Caused by this wikitext line:

{{Election box begin |title=[[United Kingdom general election, 2010|General Election 2010]]: Croydon South}} <ref>[http://ukpollingreport.co.uk/guide/seat-profiles/croydonsouth Croydon South] UK Polling Report</ref>

The <ref> should be *inside* the template rather than outside it. This causes Parsoid to generate

<tr> <span about="#mwt3" class="reference" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1">[1]</a></span>
</tr>

That span of course gets fostered about and breaks the about-grouping by inserting itself before the table! And, causes erroneous serialized output. That error can be reproduced with this wikitext snippet:

{{echo|{{{!}}
{{!}}-}}<ref>foo</ref>
|}

I will edit the page and fix the problem for now, but leaving this bug report behind to see what can be fixed.

ssastry renamed this task from Potential template encapsulation bug to Don't generate fosterable content in tables.Apr 16 2015, 12:36 AM

Change 204439 had a related patch set uploaded (by Subramanya Sastry):
T96197: <ref> marker metas should remain fosterable in HTML builder

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

Change 204439 merged by jenkins-bot:
T96197: <ref> marker metas should remain fosterable in HTML builder

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

ssastry removed a project: Patch-For-Review.
ssastry removed a subscriber: gerritbot.