Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0bf0570

Browse files
committed
docs(minErr): rename sce/isecrurl to sce/insecurl
1 parent 3ab579a commit 0bf0570

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

docs/content/error/sce/isecrurl.ngdoc renamed to docs/content/error/insecurl.ngdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@ngdoc error
2-
@name $sce:isecrurl
2+
@name $sce:insecurl
33
@fullName Blocked loading an untrusted resource
44
@description
55

src/ng/sce.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ function $SceDelegateProvider() {
301301
if (isResourceUrlAllowedByPolicy(maybeTrusted)) {
302302
return maybeTrusted;
303303
} else {
304-
throw $sceMinErr('isecrurl',
304+
throw $sceMinErr('insecurl',
305305
'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}', maybeTrusted.toString());
306306
}
307307
} else if (type === SCE_CONTEXTS.HTML) {

test/ng/compileSpec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ describe('$compile', function() {
748748
expect(function() {
749749
$templateCache.put('http://example.com/should-not-load.html', 'Should not load even if in cache.');
750750
$compile('<div class="crossDomainTemplate"></div>')($rootScope);
751-
}).toThrow('[$sce:isecrurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: http://example.com/should-not-load.html');
751+
}).toThrow('[$sce:insecurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: http://example.com/should-not-load.html');
752752
}));
753753

754754
it('should load cross domain templates when trusted', inject(
@@ -3063,7 +3063,7 @@ describe('$compile', function() {
30633063
element = $compile('<iframe src="{{testUrl}}"></iframe>')($rootScope);
30643064
$rootScope.testUrl = "http://a.different.domain.example.com";
30653065
expect(function() { $rootScope.$apply() }).toThrow(
3066-
"[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:isecrurl] Blocked " +
3066+
"[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:insecurl] Blocked " +
30673067
"loading resource from url not allowed by $sceDelegate policy. URL: " +
30683068
"http://a.different.domain.example.com");
30693069
}));
@@ -3072,7 +3072,7 @@ describe('$compile', function() {
30723072
element = $compile('<iframe src="{{testUrl}}"></iframe>')($rootScope);
30733073
$rootScope.testUrl = "javascript:alert(1);";
30743074
expect(function() { $rootScope.$apply() }).toThrow(
3075-
"[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:isecrurl] Blocked " +
3075+
"[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:insecurl] Blocked " +
30763076
"loading resource from url not allowed by $sceDelegate policy. URL: " +
30773077
"javascript:alert(1);");
30783078
}));
@@ -3081,7 +3081,7 @@ describe('$compile', function() {
30813081
element = $compile('<iframe src="{{testUrl}}"></iframe>')($rootScope);
30823082
$rootScope.testUrl = $sce.trustAsUrl("javascript:doTrustedStuff()");
30833083
expect($rootScope.$apply).toThrow(
3084-
"[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:isecrurl] Blocked " +
3084+
"[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:insecurl] Blocked " +
30853085
"loading resource from url not allowed by $sceDelegate policy. URL: javascript:doTrustedStuff()");
30863086
}));
30873087

test/ng/directive/booleanAttrsSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ describe('ngSrc', function() {
163163
});
164164
element.attr('src');
165165
}).toThrow(
166-
"[$interpolate:interr] Can't interpolate: {{id}}\nError: [$sce:isecrurl] Blocked " +
166+
"[$interpolate:interr] Can't interpolate: {{id}}\nError: [$sce:insecurl] Blocked " +
167167
"loading resource from url not allowed by $sceDelegate policy. URL: http://somewhere");
168168
}));
169169

test/ng/directive/ngSrcSpec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('ngSrc', function() {
2727
element = $compile('<iframe ng-src="{{testUrl}}"></iframe>')($rootScope);
2828
$rootScope.testUrl = "http://a.different.domain.example.com";
2929
expect(function() { $rootScope.$apply() }).toThrow(
30-
"[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:isecrurl] Blocked " +
30+
"[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:insecurl] Blocked " +
3131
"loading resource from url not allowed by $sceDelegate policy. URL: " +
3232
"http://a.different.domain.example.com");
3333
}));
@@ -36,7 +36,7 @@ describe('ngSrc', function() {
3636
element = $compile('<iframe ng-src="{{testUrl}}"></iframe>')($rootScope);
3737
$rootScope.testUrl = "javascript:alert(1);";
3838
expect(function() { $rootScope.$apply() }).toThrow(
39-
"[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:isecrurl] Blocked " +
39+
"[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:insecurl] Blocked " +
4040
"loading resource from url not allowed by $sceDelegate policy. URL: " +
4141
"javascript:alert(1);");
4242
}));
@@ -45,7 +45,7 @@ describe('ngSrc', function() {
4545
element = $compile('<iframe ng-src="{{testUrl}}"></iframe>')($rootScope);
4646
$rootScope.testUrl = $sce.trustAsUrl("javascript:doTrustedStuff()");
4747
expect($rootScope.$apply).toThrow(
48-
"[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:isecrurl] Blocked " +
48+
"[$interpolate:interr] Can't interpolate: {{testUrl}}\nError: [$sce:insecurl] Blocked " +
4949
"loading resource from url not allowed by $sceDelegate policy. URL: " +
5050
"javascript:doTrustedStuff()");
5151
}));

test/ng/sceSpecs.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ describe('SCE', function() {
280280
blackList: []
281281
}, function($sce) {
282282
expect(function() { $sce.getTrustedResourceUrl('#'); }).toThrow(
283-
'[$sce:isecrurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: #');
283+
'[$sce:insecurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: #');
284284
}));
285285

286286
it('should match against normalized urls', runTest(
@@ -289,7 +289,7 @@ describe('SCE', function() {
289289
blackList: []
290290
}, function($sce) {
291291
expect(function() { $sce.getTrustedResourceUrl('foo'); }).toThrow(
292-
'[$sce:isecrurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: foo');
292+
'[$sce:insecurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: foo');
293293
}));
294294

295295
it('should support custom regex', runTest(
@@ -299,7 +299,7 @@ describe('SCE', function() {
299299
}, function($sce) {
300300
expect($sce.getTrustedResourceUrl('http://example.com/foo')).toEqual('http://example.com/foo');
301301
expect(function() { $sce.getTrustedResourceUrl('https://example.com/foo'); }).toThrow(
302-
'[$sce:isecrurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: https://example.com/foo');
302+
'[$sce:insecurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: https://example.com/foo');
303303
}));
304304

305305
it('should support the special string "self" in whitelist', runTest(
@@ -316,7 +316,7 @@ describe('SCE', function() {
316316
blackList: ['self']
317317
}, function($sce) {
318318
expect(function() { $sce.getTrustedResourceUrl('foo'); }).toThrow(
319-
'[$sce:isecrurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: foo');
319+
'[$sce:insecurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: foo');
320320
}));
321321

322322
it('should have blacklist override the whitelist', runTest(
@@ -325,7 +325,7 @@ describe('SCE', function() {
325325
blackList: ['self']
326326
}, function($sce) {
327327
expect(function() { $sce.getTrustedResourceUrl('foo'); }).toThrow(
328-
'[$sce:isecrurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: foo');
328+
'[$sce:insecurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: foo');
329329
}));
330330

331331
it('should support multiple items in both lists', runTest(
@@ -337,9 +337,9 @@ describe('SCE', function() {
337337
expect($sce.getTrustedResourceUrl('http://example.com/1')).toEqual('http://example.com/1');
338338
expect($sce.getTrustedResourceUrl('http://example.com/2')).toEqual('http://example.com/2');
339339
expect(function() { $sce.getTrustedResourceUrl('http://example.com/3'); }).toThrow(
340-
'[$sce:isecrurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: http://example.com/3');
340+
'[$sce:insecurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: http://example.com/3');
341341
expect(function() { $sce.getTrustedResourceUrl('open_redirect'); }).toThrow(
342-
'[$sce:isecrurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: open_redirect');
342+
'[$sce:insecurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: open_redirect');
343343
}));
344344
});
345345

test/ngRoute/routeSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ describe('$route', function() {
520520
$location.path('/foo');
521521
expect(function() {
522522
$rootScope.$digest();
523-
}).toThrow('[$sce:isecrurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: http://example.com/foo.html');
523+
}).toThrow('[$sce:insecurl] Blocked loading resource from url not allowed by $sceDelegate policy. URL: http://example.com/foo.html');
524524
});
525525
});
526526

0 commit comments

Comments
 (0)