File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,6 +283,18 @@ describe('ngHref', function() {
283283 expect ( element . attr ( 'href' ) ) . toEqual ( undefined ) ;
284284 } ) ) ;
285285
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+
286298 if ( isDefined ( window . SVGElement ) ) {
287299 describe ( 'SVGAElement' , function ( ) {
288300 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