@@ -287,7 +287,7 @@ function $HttpProvider() {
287
287
* Defaults to {@link ng.$httpParamSerializer $httpParamSerializer}.
288
288
*
289
289
* - **`defaults.jsonpCallbackParam`** - `{string} - the name of the query parameter that passes the callback in a JSONP
290
- * request. The value of this parameter will be replaced with the expression generated by the {@link jsonpCallbacks}
290
+ * request. The value of this parameter will be replaced with the expression generated by the {@link $ jsonpCallbacks}
291
291
* service. Defaults to `'callback'`.
292
292
*
293
293
**/
@@ -1169,22 +1169,22 @@ function $HttpProvider() {
1169
1169
* @description
1170
1170
* Shortcut method to perform `JSONP` request.
1171
1171
*
1172
- * Note that, since JSONP requests are sensitive because the response is given full acces to the browser,
1172
+ * Note that, since JSONP requests are sensitive because the response is given full access to the browser,
1173
1173
* the url must be declared, via {@link $sce} as a trusted resource URL.
1174
1174
* You can trust a URL by adding it to the whitelist via
1175
1175
* {@link $sceDelegateProvider#resourceUrlWhitelist `$sceDelegateProvider.resourceUrlWhitelist`} or
1176
- * by explicitly trusted the URL via {@link $sce#trustAsResourceUrl `$sce.trustAsResourceUrl(url)`}.
1176
+ * by explicitly trusting the URL via {@link $sce#trustAsResourceUrl `$sce.trustAsResourceUrl(url)`}.
1177
1177
*
1178
1178
* JSONP requests must specify a callback to be used in the response from the server. This callback
1179
- * is passed as as a query parameter in the request. You must specify the name of this parameter by
1179
+ * is passed as a query parameter in the request. You must specify the name of this parameter by
1180
1180
* setting the `jsonpCallbackParam` property on the request config object.
1181
1181
*
1182
1182
* ```
1183
1183
* $http.jsonp('some/trusted/url', {jsonpCallbackParam: 'callback'})
1184
1184
* ```
1185
1185
*
1186
1186
* You can also specify a global callback parameter key in `$http.defaults.jsonpCallbackParam`.
1187
- * By default this is set to `callback`.
1187
+ * By default this is set to `' callback' `.
1188
1188
*
1189
1189
* <div class="alert alert-danger">
1190
1190
* You can no longer use the `JSON_CALLBACK` string as a placeholder for specifying where the callback
@@ -1454,7 +1454,7 @@ function $HttpProvider() {
1454
1454
throw $httpMinErr ( 'badjsonp' , 'Illegal use of JSON_CALLBACK in url, "{0}"' , url ) ;
1455
1455
}
1456
1456
1457
- var callbackParamRegex = new RegExp ( '( [&?]' + key + '=) ' ) ;
1457
+ var callbackParamRegex = new RegExp ( '[&?]' + key + '=' ) ;
1458
1458
if ( callbackParamRegex . test ( url ) ) {
1459
1459
// Throw if the callback param was already provided
1460
1460
throw $httpMinErr ( 'badjsonp' , 'Illegal use of callback param, "{0}", in url, "{1}"' , key , url ) ;
0 commit comments