Followup r92329: Fixes the localize test cases in IE 6 and 7.
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 21 Jul 2011 17:45:03 +0000 (17:45 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 21 Jul 2011 17:45:03 +0000 (17:45 +0000)
Looks like we do in fact need to select on 'msg,html\\:msg' in order to find the <html:msg> bits on both IE 6/7 (search for 'msg') and everything-else (search for 'html:msg').

resources/jquery/jquery.localize.js

index 97072e2..3a7925b 100644 (file)
@@ -37,7 +37,12 @@ $.fn.localize = function( options ) {
                return mw.msg.apply( mw, args );
        };
        return $(this)
-               .find( 'html\\:msg' )
+               // Ok, so here's the story on this selector.
+               // In IE 6/7, searching for 'msg' turns up the 'html:msg', but searching for 'html:msg' does not.
+               // In later IE and other browsers, searching for 'html:msg' turns up the 'html:msg', but searching for 'msg' does not.
+               // So searching for both 'msg' and 'html:msg' seems to get the job done.
+               // This feels pretty icky, though.
+               .find( 'msg,html\\:msg' )
                        .each( function() {
                                var $el = $(this);
                                $el