Matthias Mullie has submitted this change and it was merged. Change subject: mediawiki.jqueryMsg: Fix double-escaped attributes in the parser ......................................................................
mediawiki.jqueryMsg: Fix double-escaped attributes in the parser E.g.: message: "Your feedback has been [$1 posted here]." In mediawiki.jqueryMsg.js, L31, the parser would (rightfully) escape XML entities in the parameter (a link) being assigned through $1 When actually adding the (already escaped) parameter as href- attribute of the link-to-be-built, it'll automatically have its HTML entities escaped once again (thus double-escaping &'s) This patch will identify regular links and links with replacement- url's in a different way; now the escaping can be moved to when the variables are actually being replaced (for normal parameter replacement) and can be processed differently (= not escaping) when dealing with a link. Tests: - Removed useless ok() tests. I accidentally introduced that pattern last year for no good reason. Slowly getting it out again. It either can't return false, or it tests unrelated things that have their own tests. - Simplified examples to reduce repetition of unrelated strings. - Improved assertion titles to better describe what is being tested to help find actual problems. (e.g. "Neutral from mw.user object" instead of "Gender neutral or unknown"). Change-Id: If060b75f5575f4c7c3a25e5280ae697171120e84 --- M resources/mediawiki/mediawiki.jqueryMsg.js M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js 2 files changed, 149 insertions(+), 51 deletions(-) Approvals: Matthias Mullie: Verified; Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/14092 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If060b75f5575f4c7c3a25e5280ae697171120e84 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.20wmf6 Gerrit-Owner: Matthias Mullie <[email protected]> Gerrit-Reviewer: Matthias Mullie <[email protected]> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
