Skip to content
Permalink
Browse files

test(booleanAttrsSpec): add unit test for IE11 URL parsing failure

IE11/10/Edge fail when setting a href to a URL containing a % that isn't a valid escape sequence

See #13388
Closes #13458
  • Loading branch information
Andy Patterson authored and petebacondarwin committed Dec 7, 2015
1 parent 3c5827b commit b2b896f949b79f1d8c558f462fabad1c04bf564e
Showing with 12 additions and 0 deletions.
  1. +12 −0 test/ng/directive/booleanAttrsSpec.js
@@ -283,6 +283,18 @@ describe('ngHref', function() {
expect(element.attr('href')).toEqual(undefined);
}));

if (msie) {
// IE11/10/Edge fail when setting a href to a URL containing a % that isn't a valid escape sequence
// See https://github.com/angular/angular.js/issues/13388
it('should throw error if ng-href contains a non-escaped percent symbol', inject(function($rootScope, $compile) {
element = $compile('<a ng-href="http://www.google.com/{{\'a%link\'}}">')($rootScope);

expect(function() {
$rootScope.$digest();
}).toThrow();
}));
}

if (isDefined(window.SVGElement)) {
describe('SVGAElement', function() {
it('should interpolate the expression and bind to xlink:href', inject(function($compile, $rootScope) {

0 comments on commit b2b896f

Please sign in to comment.
You can’t perform that action at this time.