Page MenuHomePhabricator

Parsoid gives up on templated nowiki’d <nowiki>
Open, MediumPublicBUG REPORT

Description

Steps to Reproduce:

Actual Results:

  • The normal rendering looks OK, but Parsoid gives up at the point where it encounters <code><nowiki><nowiki></nowiki></code>.
  • The page info lists one missing closing tag (this should be the </code>, which Parsoid thinks to be in nowiki).

Expected Results:

  • The same result in Parsoid as in normal rendering.
  • No lint error.

Event Timeline

Arlolra triaged this task as Medium priority.Jun 21 2021, 9:59 PM
Arlolra moved this task from Needs Triage to Bugs & Crashers on the Parsoid board.
Arlolra added a subscriber: Arlolra.

Here's an isolated case,

{{1x|
<code><nowiki><nowiki></nowiki></code>

<code><nowiki>something</nowiki></code>
}}

which parses as,

<span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]],"dsr":[0,88,null,null]}' data-mw='{"parts":[{"template":{"target":{"wt":"1x","href":"./Template:1x"},"params":{"1":{"wt":"\n&lt;code>&lt;nowiki>&lt;nowiki>&lt;/nowiki>&lt;/code>\n\n&lt;code>&lt;nowiki>something&lt;/nowiki>&lt;/code>\n"}},"i":0}}]}'>
</span><p about="#mwt3"><code>&lt;nowiki>&lt;/nowiki>&lt;/code>

&lt;code>&lt;nowiki>something</code>
</p>

The reason is because of T104662, which gratuitously allows nested extension tags when coming from templates because Parsoid doesn't have the insight about when {{#tag}} was used during template expansion.

Arlolra renamed this task from Parsoid gives up on nowiki’d <nowiki> to Parsoid gives up on templated nowiki’d <nowiki>.Jun 21 2021, 9:59 PM