Page MenuHomePhabricator

<span name="foo "bar""> is rendered as plain text
Closed, ResolvedPublic

Description

To reproduce:

  1. Edit an article in the English Wikipedia.
  2. Press Insert -> Template.
  3. Enter "Clarify" as the template name. Press "Add template".
  4. Press "Add more information".
  5. Press "reason".
  6. Write the following line in the input box:

test "quotes"
(include the double quotes as in the line above)

  1. Press "Insert template".

Observed: The inserted template says:
[<span title="test "quotes"">clarification needed]

Expected: The inserted template should say:
[clarification needed]


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=55400
https://bugzilla.wikimedia.org/show_bug.cgi?id=69652

Details

Reference
bz66065

Event Timeline

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

This is a Parsoid problem, though arguably a bug with the template – it's failing to escape user input and so breaks if the users' input has a terminal quote.

Wikitext input:

{{Clarify|reason = test "quotes"}}

MW parser output:

<sup class="noprint Inline-Template" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Please_clarify" title="Wikipedia:Please clarify"><span>clarification needed</span></a></i>]</sup>

Parsoid output:

<sup class="noprint Inline-Template " style="white-space:nowrap;" about="#mwt21" typeof="mw:Transclusion" data-mw="…" data-parsoid="…"><span typeof="mw:Entity" data-parsoid="…">[</span><i data-parsoid="…"><a rel="mw:WikiLink" href="../Wikipedia:Please_clarify" data-parsoid="…">&lt;span title="test "quotes""&gt;clarification needed</a></i><span typeof="mw:Entity" data-parsoid="…">]</span></sup>
  • This bug has been marked as a duplicate of bug 69652 ***