File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,18 @@ describe('ngHref', function() {
283
283
expect ( element . attr ( 'href' ) ) . toEqual ( undefined ) ;
284
284
} ) ) ;
285
285
286
+ if ( msie ) {
287
+ // IE11/10/Edge fail when setting a href to a URL containing a % that isn't a valid escape sequence
288
+ // See https://github.com/angular/angular.js/issues/13388
289
+ it ( 'should throw error if ng-href contains a non-escaped percent symbol' , inject ( function ( $rootScope , $compile ) {
290
+ element = $compile ( '<a ng-href="http://www.google.com/{{\'a%link\'}}">' ) ( $rootScope ) ;
291
+
292
+ expect ( function ( ) {
293
+ $rootScope . $digest ( ) ;
294
+ } ) . toThrow ( ) ;
295
+ } ) ) ;
296
+ }
297
+
286
298
if ( isDefined ( window . SVGElement ) ) {
287
299
describe ( 'SVGAElement' , function ( ) {
288
300
it ( 'should interpolate the expression and bind to xlink:href' , inject ( function ( $compile , $rootScope ) {
You can’t perform that action at this time.
0 commit comments