Page MenuHomePhabricator

jqueryMsg's $.fn.msg() plugin function no longer parses HTML
Closed, ResolvedPublic

Description

jqueryMsg's $.fn.msg() plugin function no longer parses HTML. Caused by 2dd9ec21dc5d5f2c25658b58a2dc9f564331e6e2, which changed the order of some initialization operations.

Note that this is annoying to reproduce due to T54042 – if the message is first parsed via $.fn.msg(), all subsequent parses will be wrong; if the message is first parsed via mw.message().parse(), all subsequent parses will be correct.

> mw.messages.set('test1', '<b>Bold!</b>')
< true
> mw.message('test1').parse()
< "<b>Bold!</b>"
> $('<span>').msg('test1').html()
< "<b>Bold!</b>"
> mw.messages.set('test2', '<b>Bold!</b>')
< true
> $('<span>').msg('test2').html()
< "&lt;b&gt;Bold!&lt;/b&gt;"
> mw.message('test2').parse()
< "&lt;b&gt;Bold!&lt;/b&gt;"

Event Timeline

matmarex created this task.Oct 16 2015, 3:17 PM
matmarex updated the task description. (Show Details)
matmarex raised the priority of this task from to Needs Triage.
matmarex added subscribers: matmarex, Krinkle.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 16 2015, 3:17 PM

Change 246941 had a related patch set uploaded (by Bartosz Dziewoński):
mediawiki.jqueryMsg: Lazy-initialize parsers with getFailableParserFn()

https://gerrit.wikimedia.org/r/246941

Change 246941 merged by jenkins-bot:
mediawiki.jqueryMsg: Lazy-initialize parsers with getFailableParserFn()

https://gerrit.wikimedia.org/r/246941

Change 249134 had a related patch set uploaded (by Bartosz Dziewoński):
mediawiki.jqueryMsg: Lazy-initialize parsers with getFailableParserFn()

https://gerrit.wikimedia.org/r/249134

matmarex closed this task as Resolved.Oct 27 2015, 2:36 PM
matmarex triaged this task as High priority.
matmarex edited projects, added MW-1.26-release; removed Patch-For-Review.
matmarex set Security to None.

Change 249134 merged by jenkins-bot:
mediawiki.jqueryMsg: Lazy-initialize parsers with getFailableParserFn()

https://gerrit.wikimedia.org/r/249134