mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Merge pull request #473 from dmethvin/fix-10098-faux-comment
Fixes #10098. Avoid a slashy-starry char sequence to prevent T-Mobile (and other brain-damaged) script compression breaking jQuery.
This commit is contained in:
commit
979dd1cb42
@ -42,7 +42,10 @@ var r20 = /%20/g,
|
|||||||
ajaxLocation,
|
ajaxLocation,
|
||||||
|
|
||||||
// Document location segments
|
// Document location segments
|
||||||
ajaxLocParts;
|
ajaxLocParts,
|
||||||
|
|
||||||
|
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
|
||||||
|
allTypes = ["*/"] + ["*"];
|
||||||
|
|
||||||
// #8138, IE may throw an exception when accessing
|
// #8138, IE may throw an exception when accessing
|
||||||
// a field from window.location if document.domain has been set
|
// a field from window.location if document.domain has been set
|
||||||
@ -331,7 +334,7 @@ jQuery.extend({
|
|||||||
html: "text/html",
|
html: "text/html",
|
||||||
text: "text/plain",
|
text: "text/plain",
|
||||||
json: "application/json, text/javascript",
|
json: "application/json, text/javascript",
|
||||||
"*": "*/*"
|
"*": allTypes
|
||||||
},
|
},
|
||||||
|
|
||||||
contents: {
|
contents: {
|
||||||
@ -702,7 +705,7 @@ jQuery.extend({
|
|||||||
jqXHR.setRequestHeader(
|
jqXHR.setRequestHeader(
|
||||||
"Accept",
|
"Accept",
|
||||||
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
|
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
|
||||||
s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", */*; q=0.01" : "" ) :
|
s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
|
||||||
s.accepts[ "*" ]
|
s.accepts[ "*" ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user