Last modified: 2013-01-14 17:03:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T44914, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42914 - {{int:}} returns raw <> interpreted as HTML tag when called on a missing message key
{{int:}} returns raw <> interpreted as HTML tag when called on a missing mess...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.21.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-10 13:48 UTC by Mormegil
Modified: 2013-01-14 17:03 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Mormegil 2012-12-10 13:48:22 UTC
When an undefined message is requested via wfMessage, the result is something like “<messagekey>”, i.e. the message key in angle brackets.

When such a missing message is requested using the {{int:X}} parser function, the resulting “<X>” is treated as wikitext, or HTML. If the message key does not correspond to any allowed HTML/wikitext tag, it is escaped and works correctly. However, code such as “{{int:var}}” results in “<var>” which is passed literally to output HTML and interpreted as an HTML tag.

The problem is visible at TranslateWiki.net where the {{msg-mw}} template uses {{int:}} to show the current translation of MediaWiki messages. But when used on a message from an extension not installed on TW, the result is often broken, see e.g. the last line at http://translatewiki.net/wiki/Template:Identical/Revert, where “{{int:Code-status-reverted}}” is interpreted as “<Code-status-reverted>”, which is in turn interpreted as “<code>”.

I believe the problem was introduced in r81528, where the refactoring of intFunction() to use the wfMessage() introduced “->plain()” there.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links