Page MenuHomePhabricator

mw.message output formats other than plain allowing unintended behaviors
Closed, ResolvedPublic


Using mw.message.newRawMessage allows performing several actions that are otherwise disabled because they break things, such as checking if a page exists without incrementing the expensive function count or adding a pagelink (see for more), and for getting Wikidata properties of pages other than the current one, which also won't be updated properly (see for more). Is there some way that newRawMessage could be tweaked to either not allow this type of thing at all, or to make it happen properly?

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:05 AM
bzimport added a project: Scribunto.
bzimport set Reference to bz60758.
bzimport added a subscriber: Unknown Object (MLST).

The problem is that it's not happening in Scribunto, it's the underlying Message classes that are doing this.

The ideal thing to do might be to remove mw.message:parse, mw.message:parseAsBlock, mw.message:text, and mw.message:escaped. mw.message:plain would continue to be available; this is the equivalent of the {{int:}} magic word.

Also note it's not just RawMessage, someone with editinterface could put the same problematic things in the MediaWiki namespace and use it that way.

Change 110983 had a related patch set uploaded by Jackmcbarn:
Remove message formats other than plain

Change 110983 merged by jenkins-bot:
Remove message formats other than plain

The change will be deployed to WMF wikis with 1.23wmf14, see for the schedule.