diff --git a/vendor/assets/javascripts/jquery_ujs.js b/vendor/assets/javascripts/jquery_ujs.js index 3c941067..0f8f3dcd 100644 --- a/vendor/assets/javascripts/jquery_ujs.js +++ b/vendor/assets/javascripts/jquery_ujs.js @@ -176,10 +176,14 @@ // This is a workaround to a IE bug. urlAnchor.href = urlAnchor.href; - // Make sure that the browser parses the URL and that the protocols and hosts match. - return !urlAnchor.protocol || !urlAnchor.host || - (originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host); + // If URL protocol is false or is a string containing a single colon + // *and* host are false, assume it is not a cross-domain request + // (should only be the case for IE7 and IE compatibility mode). + // Otherwise, evaluate protocol and host of the URL against the origin + // protocol and host + return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) || + (originAnchor.protocol + "//" + originAnchor.host === + urlAnchor.protocol + "//" + urlAnchor.host)); // } catch (e) { // If there is an error parsing the URL, assume it is crossDomain. return true;