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

Michael M. <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |

--- Comment #2 from Michael M. <[email protected]> 2012-02-14 09:33:46 UTC 
---
(In reply to comment #1)
> You can give jquery objects as parameters.

OK, that works:

>>> gM('testmsg', $('<b>Bold</b>'));
"Parameter: <b>Bold</b>"

But

>>> mw.msg('testmsg', $('<b>Bold</b>'));
"Parameter: [object Object]"

Or in a more complex example:

>>> mw.messages.set({'testmsg1': '$1 thing(s): $2', 'testmsg2': '$1 
>>> {{PLURAL:$1|thing|things}}: $2'});
true

>>> mw.msg('testmsg1', 1, '<b>item</b>');
"1 thing(s): <b>item</b>"

>>> mw.msg('testmsg2', 1, '<b>item</b>');
"1 thing: &lt;b&gt;item&lt;/b&gt;"

>>> mw.msg('testmsg1', 1, $('<b>item</b>'));
"1 thing(s): [object Object]"

>>> mw.msg('testmsg2', 1, $('<b>item</b>'));
"1 thing: <b>item</b>"

This still means that you have change the parameters in the calls to mw.msg
whenever the message changes from something without "{{" to something with "{{"
or vice versa. (Or when the code jqueryMsg changes, which parser to use.)

So the default mw.msg should change to escape all HTML but accept jQuery
objects.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- 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

Reply via email to