For JSON and script requests, set the scriptCharset before the url so IE won't interpret it the wrong way; fixes #4855.

This commit is contained in:
dmethvin 2010-06-27 09:16:39 +08:00 committed by John Resig
parent 033a4c41e0
commit c8c8f8458a

View file

@ -300,10 +300,10 @@ jQuery.extend({
if ( s.dataType === "script" && type === "GET" && remote ) {
var head = document.getElementsByTagName("head")[0] || document.documentElement;
var script = document.createElement("script");
script.src = s.url;
if ( s.scriptCharset ) {
script.charset = s.scriptCharset;
}
script.src = s.url;
// Handle Script loading
if ( !jsonp ) {