https://bugzilla.wikimedia.org/show_bug.cgi?id=67003
Bug ID: 67003
Summary: Parameters can be expanded multiple times when using
Message::rawParam
Product: MediaWiki
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Internationalization
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected], [email protected],
[email protected], [email protected]
Web browser: ---
Mobile Platform: ---
Any i18n message that includes user generated content and at least one raw
parameter is susceptible to having special sequences, like $1, from the user
generated content replaced in the output.
Sample Code:
$msg = new RawMessage( '$1 $2', array( 'First $2', 'Second $1' ) );
echo $msg->text(), "\n";
$msg = new RawMessage( '$1 $2', array( 'First $2', Message::rawParam(
'Second $1' ) ) );
echo $msg->text(), "\n";
Expected Output:
First $2 to the Second $1
First $2 to the Second $1
Actual Output:
First $2 to the Second $1
First Second $1 to the Second $1
Utilizing Message::rawParam() should only change the result of that singular
parameter, and not the entire message.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l