Page MenuHomePhabricator

VisualEditor: Templates (incorrectly) expanded
Closed, ResolvedPublic

Description

https://en.wikipedia.org/wiki/Template:Contradictory, on https://en.wikipedia.org/wiki/Necessity - in the VisualEditor it displays as [<span title="This text contradicts text in the article "Necessity in English law" (3 May 2011)">contradictory]. Reproduced in Chrome 27/Safari 6.0.5 on a Mac, Firefox 21.0 on Windows 7.


Version: unspecified
Severity: major

Details

Reference
bz49690

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:58 AM
bzimport added a project: Parsoid-DOM.
bzimport set Reference to bz49690.

This is actually [[Template:Contradict-inline]] that appears broken in Parsoid - see http://parsoid.wmflabs.org/en/Template:Contradict-inline - shunting over.

Reduced test case: {{Fix|text=foo|title="bar"}}

It is the quotes around "baz" that trips up Parsoid (probably the tokenizer). Investigating more.

This amounts to accepting <span title=""foo"">bar</span> as a valid span-tag. Ugh! The PHP parser seems to accept this quite fine. Parsoid would have to perform the same magic.

See http://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&oldid=560521020

Hover over the two foos and see the difference. PHP parser drops the title attribute 'bar' on the first foo since it is ofcourse a bug.

Seems like a reasonable fix the Fix templat -- but I assume Fix is used in a lot of places and fixing the callers would be a lot of work ... so, we may need some ugly hack in Parsoid to support this.