aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-08-22 22:32:06 -0400
committerDave Methvin <dave.methvin@gmail.com>2011-08-22 22:32:06 -0400
commit771e637a5193c63bd18f6edae8af3787a46f003e (patch)
tree17008be70b3d9647f6476b4317dd0e14bcfc5d06
parent84f29084d6ac8077ce5dcb4dd94d43aaeed18fb0 (diff)
downloadjquery-771e637a5193c63bd18f6edae8af3787a46f003e.tar.gz
jquery-771e637a5193c63bd18f6edae8af3787a46f003e.zip
Fixes #10098. Avoid a slashy-starry char sequence in literal strings to evade faulty script compressors.
-rw-r--r--src/ajax.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ajax.js b/src/ajax.js
index e12139e9e..e112efa7d 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -42,7 +42,10 @@ var r20 = /%20/g,
ajaxLocation,
// Document location segments
- ajaxLocParts;
+ ajaxLocParts,
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ starSlashStar = "*/".concat("*");
// #8138, IE may throw an exception when accessing
// a field from window.location if document.domain has been set
@@ -331,7 +334,7 @@ jQuery.extend({
html: "text/html",
text: "text/plain",
json: "application/json, text/javascript",
- "*": "*/*"
+ "*": starSlashStar
},
contents: {
@@ -702,7 +705,7 @@ jQuery.extend({
jqXHR.setRequestHeader(
"Accept",
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 ] !== "*" ? ", " + starSlashStar + "; q=0.01" : "" ) :
s.accepts[ "*" ]
);