Page MenuHomePhabricator

Issues with {{#interwikilink}} with complex link text
Open, Needs TriagePublic

Description

{{#interwikilink:en|Foo|a <ref>....</ref> b}}

doesn't work in Parsoid, for two reasons:

  1. The <ref> generates an <a> tag, causing an <a>-tag-in-<a>-tag scenario. This is also the case for legacy, and causes the interwikilink to terminate before the final b
  2. We are in mStripExtTags=false mode in the legacy Parser when we call Parser::recursiveTagParseFully and so the embedded <ref> is not fully parsed to HTML, but it instead either left as-is (ParsoidFragmentMode=='v1') or left as a strip marker (ParsoidFragmentMode=='v2'). We need to either flip out of mStripExtTags mode in the legacy parser or (better) use Parsoid for the recursive parse.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1104734 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] ParsoidFragmentMode: use special 'exttag' strip marker

https://gerrit.wikimedia.org/r/1104734

Change #1104739 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] Kill strip markers from {{#interwikilink}}

https://gerrit.wikimedia.org/r/1104739

Change #1104734 merged by jenkins-bot:

[mediawiki/core@master] ParsoidFragmentMode: use special 'exttag' strip marker

https://gerrit.wikimedia.org/r/1104734