| | 174 | }, |
| | 175 | "json-comment-optional": function(xhr){ |
| | 176 | // NOTE: we provide the json-comment-filtered option as one solution to |
| | 177 | // the "JavaScript Hijacking" issue noted by Fortify and others. It is |
| | 178 | // not appropriate for all circumstances. |
| | 179 | var value = xhr.responseText; |
| | 180 | var cStartIdx = value.indexOf("\/*"); |
| | 181 | var cEndIdx = value.lastIndexOf("*\/"); |
| | 182 | if((cStartIdx == -1)||(cEndIdx == -1)){ |
| | 183 | return dojo.fromJson(xhr.responseText); |
| | 184 | } |
| | 185 | return dojo.fromJson(value.substring(cStartIdx+2, cEndIdx)); |