https://bugzilla.wikimedia.org/show_bug.cgi?id=42914

       Web browser: ---
            Bug ID: 42914
           Summary: {{int:}} returns raw <> interpreted as HTML tag when
                    called on a missing message key
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Parser
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to