User "Raindrift" posted a comment on MediaWiki.r96699.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96699#c22295
Commit summary:

Provisional workaround for bug 30825 as it affects things run via $.ajax() 
using protocol-relative links built from wgServer etc -- IE 7 gets confused and 
denies access for protocol-relative URLs on XMLHTTPRequest, while it's ok 
everywhere else.
This is already internally fixed in jQuery 1.6, so won't be needed on 1.18 and 
later.

Comment:

Worth noting: when jQuery 1.6 accesses window.location, it does it this way:

 <nowiki>
var ajaxLocation;
// #8138, IE may throw an exception when accessing
// a field from window.location if document.domain has been set
try {
        ajaxLocation = location.href;
} catch( e ) {
        // Use the href attribute of an A element
        // since IE will modify it given document.location
        ajaxLocation = document.createElement( "a" );
        ajaxLocation.href = "";
        ajaxLocation = ajaxLocation.href;
}
</nowiki>

Here is the issue in the jQuery bug tracker: http://bugs.jquery.com/ticket/8138

I'm not clear on whether this will affect MediaWiki, but we may want to do the 
same thing (but with .protocol instead of .href, of course).


_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to