Matthias Mullie has uploaded a new change for review. 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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/92/14092/1 -- To view, visit https://gerrit.wikimedia.org/r/14092 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If060b75f5575f4c7c3a25e5280ae697171120e84 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.20wmf6 Gerrit-Owner: Matthias Mullie <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
