Changeset 11057
- Timestamp:
- 10/22/07 14:53:01 (15 months ago)
- Files:
-
- 1 modified
-
dojo/trunk/_base/xhr.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dojo/trunk/_base/xhr.js
r10982 r11057 209 209 "json": function(xhr){ 210 210 if(!djConfig.usePlainJson){ 211 console.debug(" consider using a mimetype oftext/json-comment-filtered"211 console.debug("Consider using mimetype:text/json-comment-filtered" 212 212 + " to avoid potential security issues with JSON endpoints" 213 213 + " (use djConfig.usePlainJson=true to turn off this message)"); … … 219 219 // the "JavaScript Hijacking" issue noted by Fortify and others. It is 220 220 // not appropriate for all circumstances. 221 var match = xhr.responseText.match(/\/\*(.*)\*\//); 221 222 //FIXME: is this precise enough? This might do a partial match on the multiline string. 223 var match = xhr.responseText.match(/\/\*([\s\S]*)\*\//m); 222 224 if(!match){ 223 throw new Error(" your JSON wasn't comment filtered!");225 throw new Error("JSON was not comment filtered"); 224 226 } 225 227 return dojo.fromJson(match[1]);