Bug Tracker

Ticket #2816: remote-ajax.diff

File remote-ajax.diff, 0.7 kB (added by flesler, 5 months ago)

This should fix the former naive check ( shouldn't '//' be '/' ? )

  • ajax.js

     
    235235 
    236236        // If we're requesting a remote document 
    237237        // and trying to load JSON or Script with a GET 
    238         if ( (!s.url.indexOf("http") || !s.url.indexOf("//")) && s.dataType == "script" && s.type.toLowerCase() == "get" ) { 
     238        if ( (!s.url.indexOf("http") || !s.url.indexOf("/")) && s.url.indexOf("/"+location.host) == -1 
     239                && s.dataType == "script" && s.type.toLowerCase() == "get" ) { 
    239240            var head = document.getElementsByTagName("head")[0]; 
    240241            var script = document.createElement("script"); 
    241242            script.src = s.url;