Commit c8c8f845 authored by dmethvin's avatar dmethvin Committed by John Resig

For JSON and script requests, set the scriptCharset before the url so IE won't...

For JSON and script requests, set the scriptCharset before the url so IE won't interpret it the wrong way; fixes #4855.
parent 033a4c41
...@@ -300,10 +300,10 @@ jQuery.extend({ ...@@ -300,10 +300,10 @@ jQuery.extend({
if ( s.dataType === "script" && type === "GET" && remote ) { if ( s.dataType === "script" && type === "GET" && remote ) {
var head = document.getElementsByTagName("head")[0] || document.documentElement; var head = document.getElementsByTagName("head")[0] || document.documentElement;
var script = document.createElement("script"); var script = document.createElement("script");
script.src = s.url;
if ( s.scriptCharset ) { if ( s.scriptCharset ) {
script.charset = s.scriptCharset; script.charset = s.scriptCharset;
} }
script.src = s.url;
// Handle Script loading // Handle Script loading
if ( !jsonp ) { if ( !jsonp ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment