Last modified: 2013-06-18 22:57:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51690, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49690 - VisualEditor: Templates (incorrectly) expanded
VisualEditor: Templates (incorrectly) expanded
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
DOM (Other open bugs)
unspecified
All All
: High major
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-17 11:52 UTC by Oliver Keyes
Modified: 2013-06-18 22:57 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Oliver Keyes 2013-06-17 11:52:20 UTC
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.
Comment 1 James Forrester 2013-06-18 00:01:50 UTC
This is actually [[Template:Contradict-inline]] that appears broken in Parsoid - see http://parsoid.wmflabs.org/en/Template:Contradict-inline - shunting over.
Comment 2 ssastry 2013-06-18 22:39:54 UTC
Reduced test case: {{Fix|text=foo|title="bar"}}

It is the quotes around "baz" that trips up Parsoid (probably the tokenizer).  Investigating more.
Comment 3 ssastry 2013-06-18 22:47:33 UTC
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.
Comment 4 ssastry 2013-06-18 22:57:32 UTC
I changed the Contradict-inline template and that fixes this problem.

https://en.wikipedia.org/w/index.php?title=Template%3AContradict-inline&diff=560522227&oldid=471439681

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links