Page MenuHomePhabricator

PHP parser and Parsoid disagree on unbalanced curly braces
Open, LowPublic

Description

https://en.wikipedia.org/w/index.php?title=MediaWiki_talk:Citethispage-content&oldid=1002487112

On the above page, the PHP parser parses the whole thing "normally". However, Parsoid renders everything between Boud's post on 22:10, 11 December 2017 and JJMC89's post on 02:11, 13 February 2019 in italics as plaintext. Boud's post contains this wikitext:

''author = "{{de Gaulle}, C.}"'' or ''author = "{{de~Gaulle}, C.}"''

And JJMC89's post contains this wikitext:

<code>}}</code>

Event Timeline

The context of the page was not meant to be a template.

This is some edge case in Parsoid when the template name is considered templated and when the name turns out not to be a template, Parsoid falls back, and it seems to then just spit back the original wikitext for it. It doesn't fail in all cases, but I could reduce it to this test case:{{Foo {{1x|x}} <pre>x</pre>}}. Both the {{1x|x}} and <pre>x</pre> pieces are needed to reproduce this.

ssastry moved this task from Needs Triage to Bugs & Crashers on the Parsoid board.