Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 5e85ef3

Browse files
committed
docs(*): fix docs on recently deprecated properties/methods
In commits 9679e58..3dd42ce, some properties and methods names including the terms whitelist/blacklist were deprecated in favor of new ones not including the terms. This commit fixes some typos in docs related to these changes and adds links to the new properties/methods in the changelog for easier access. Fixes #17088
1 parent 1c64a35 commit 5e85ef3

File tree

5 files changed

+22
-18
lines changed

5 files changed

+22
-18
lines changed

CHANGELOG.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,24 @@
88
## Refactorings
99

1010
- **SanitizeUriProvider:** remove usages of whitelist
11-
([76738102](https:github.com/angular/angular.js/commit/767381020d88bda2855ac87ca6f00748907e14ff))
11+
([76738102](https://github.com/angular/angular.js/commit/767381020d88bda2855ac87ca6f00748907e14ff))
1212
- **httpProvider:** remove usages of whitelist and blacklist
13-
([c953af6b](https:github.com/angular/angular.js/commit/c953af6b8cfeefe4acc0ca358550eed5da8cfe00))
13+
([c953af6b](https://github.com/angular/angular.js/commit/c953af6b8cfeefe4acc0ca358550eed5da8cfe00))
1414
- **sceDelegateProvider:** remove usages of whitelist and blacklist
15-
([a206e267](https:github.com/angular/angular.js/commit/a206e2675c351c3cdcde3402978126774c1c5df9))
15+
([a206e267](https://github.com/angular/angular.js/commit/a206e2675c351c3cdcde3402978126774c1c5df9))
1616

1717
## Deprecation Notices
1818

19-
- Deprecated ~~`aHrefSanitizationWhitelist`~~. It is now `aHrefSanitizationTrustedUri`
20-
- Deprecated ~~`imgSrcSanitizationWhitelist`~~. It is now `imgSrcSanitizationTrustedUri`
21-
- Deprecated ~~`xsrfWhitelistedOrigins`~~. It is now `xsrfTrustedOrigins`
22-
- Deprecated ~~`resourceUrlWhitelist`~~. It is now `trustedResourceUrlList`
23-
- Deprecated ~~`resourceUrlBlacklist`~~. It is now `bannedResourceUrlList`
19+
- Deprecated ~~`$compileProvider.aHrefSanitizationWhitelist`~~.
20+
It is now [aHrefSanitizationTrustedUrlList](https://docs.angularjs.org/api/ng/provider/$compileProvider#aHrefSanitizationTrustedUrlList)`.
21+
- Deprecated ~~`$compileProvider.imgSrcSanitizationWhitelist`~~.
22+
It is now [imgSrcSanitizationTrustedUrlList](https://docs.angularjs.org/api/ng/provider/$compileProvider#imgSrcSanitizationTrustedUrlList).
23+
- Deprecated ~~`$httpProvider.xsrfWhitelistedOrigins`~~.
24+
It is now [xsrfTrustedOrigins](https://docs.angularjs.org/api/ng/provider/$httpProvider#xsrfTrustedOrigins).
25+
- Deprecated ~~`$sceDelegateProvider.resourceUrlWhitelist`~~.
26+
It is now [trustedResourceUrlList](https://docs.angularjs.org/api/ng/provider/$sceDelegateProvider#trustedResourceUrlList).
27+
- Deprecated ~~`$sceDelegateProvider.resourceUrlBlacklist`~~.
28+
It is now [bannedResourceUrlList](https://docs.angularjs.org/api/ng/provider/$sceDelegateProvider#bannedResourceUrlList).
2429

2530
For the purposes of backward compatibility, the previous symbols are aliased to their new symbol.
2631

docs/content/guide/migration.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2663,7 +2663,7 @@ $scope.findTemplate = function(templateName) {
26632663
return templateCache[templateName];
26642664
};
26652665

2666-
// Alternatively, use `$sceDelegateProvider..resourceUrlWhitelist()` (called
2666+
// Alternatively, use `$sceDelegateProvider.resourceUrlWhitelist()` (called
26672667
// `trustedResourceUrlList()` from 1.8.1 onwards), which means you don't
26682668
// have to use `$sce.trustAsResourceUrl()` at all:
26692669

src/ng/compile.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1734,15 +1734,15 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
17341734
* @deprecated
17351735
* sinceVersion="1.8.1"
17361736
*
1737-
* This function is deprecated. Use {@link $compileProvider#aHrefSanitizationTrustedUrlList
1737+
* This method is deprecated. Use {@link $compileProvider#aHrefSanitizationTrustedUrlList
17381738
* aHrefSanitizationTrustedUrlList} instead.
17391739
*/
17401740
Object.defineProperty(this, 'aHrefSanitizationWhitelist', {
17411741
get: function() {
17421742
return this.aHrefSanitizationTrustedUrlList;
17431743
},
1744-
set: function(regexp) {
1745-
this.aHrefSanitizationTrustedUrlList = regexp;
1744+
set: function(value) {
1745+
this.aHrefSanitizationTrustedUrlList = value;
17461746
}
17471747
});
17481748

@@ -1785,15 +1785,15 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
17851785
* @deprecated
17861786
* sinceVersion="1.8.1"
17871787
*
1788-
* This function is deprecated. Use {@link $compileProvider#imgSrcSanitizationTrustedUrlList
1788+
* This method is deprecated. Use {@link $compileProvider#imgSrcSanitizationTrustedUrlList
17891789
* imgSrcSanitizationTrustedUrlList} instead.
17901790
*/
17911791
Object.defineProperty(this, 'imgSrcSanitizationWhitelist', {
17921792
get: function() {
17931793
return this.imgSrcSanitizationTrustedUrlList;
17941794
},
1795-
set: function(regexp) {
1796-
this.imgSrcSanitizationTrustedUrlList = regexp;
1795+
set: function(value) {
1796+
this.imgSrcSanitizationTrustedUrlList = value;
17971797
}
17981798
});
17991799

src/ng/http.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ function $HttpProvider() {
436436
* @deprecated
437437
* sinceVersion="1.8.1"
438438
*
439-
* This function is deprecated. Use {@link $httpProvider#xsrfTrustedOrigins xsrfTrustedOrigins}
439+
* This property is deprecated. Use {@link $httpProvider#xsrfTrustedOrigins xsrfTrustedOrigins}
440440
* instead.
441441
*/
442442
Object.defineProperty(this, 'xsrfWhitelistedOrigins', {

src/ng/sce.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ function $SceDelegateProvider() {
242242
* The **default value** when no trusted resource URL list has been explicitly set is the empty
243243
* array (i.e. there is no `bannedResourceUrlList`.)
244244
*/
245-
246245
this.bannedResourceUrlList = function(value) {
247246
if (arguments.length) {
248247
bannedResourceUrlList = adjustMatchers(value);
@@ -258,7 +257,7 @@ function $SceDelegateProvider() {
258257
* @deprecated
259258
* sinceVersion="1.8.1"
260259
*
261-
* This function is deprecated. Use {@link $sceDelegateProvider#bannedResourceUrlList
260+
* This method is deprecated. Use {@link $sceDelegateProvider#bannedResourceUrlList
262261
* bannedResourceUrlList} instead.
263262
*/
264263
Object.defineProperty(this, 'resourceUrlBlacklist', {

0 commit comments

Comments
 (0)