Page MenuHomePhabricator

Substing magic words should not be whitespace-sensitive
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Evaluate {{subst: ROOTPAGENAME}}

What happens?:
It substs the template named ROOTPAGENAME

What should have happened instead?:

It substs the magic word ROOTPAGENAME

Other information (browser name/version, screenshots, etc.):

https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)/Archive_206#Categorisation_error_due_to_error_in_user_warning_template

Event Timeline

Seems like the algorithm right now might be magic word check, trim, template check.

Perhaps the algorithm needs to be changed to trim, magic word check, template check.

Change 953346 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] parser: Fix detection of variable with whitespace after subst:

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

Change 953346 merged by jenkins-bot:

[mediawiki/core@master] parser: Fix detection of variable with whitespace after subst:

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

Pppery removed a project: Patch-For-Review.