Page MenuHomePhabricator

UNIQ Error from using {{#tag:}} with pipe in nowiki
Closed, ResolvedPublic

Description

On mediawiki.org:

{{phpi|1=<nowiki>!isset( $var ) || !$var</nowiki>}}

// Results in
UNIQ09b61f9b074499c5-nowiki-00000002-QINU

Reduced test case:

{{#tag:syntaxhighlight
|<nowiki>|</nowiki>
|lang=php
|enclose=none
}}

Event Timeline

Krinkle raised the priority of this task from to Needs Triage.
Krinkle updated the task description. (Show Details)
Krinkle added a project: MediaWiki-Parser.
Krinkle changed Security from none to None.
Krinkle subscribed.

You can workaround with: {{phpi|1=!isset( $var ) {{!}}{{!}} !$var}}

Change 289884 had a related patch set uploaded (by Chad):
SECURITY: Replace strip markers before syntax highlighting

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

Change 289885 had a related patch set uploaded (by Chad):
SECURITY: Replace strip markers before syntax highlighting

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

Change 289884 merged by jenkins-bot:
SECURITY: Replace strip markers before syntax highlighting

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

Change 289885 merged by jenkins-bot:
SECURITY: Replace strip markers before syntax highlighting

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

This seems as if it is now fixed ?

Krinkle assigned this task to demon.

Indeed. Confirmed on mediawiki.org using the original test case:

{{#tag:syntaxhighlight
|<nowiki>|</nowiki>
|lang=php
|enclose=none
}}

Now works as expected and renders a (literal) pipe character in a preformatted area.