File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ function $CompileProvider($provide) {
156156 COMMENT_DIRECTIVE_REGEXP = / ^ \s * d i r e c t i v e \: \s * ( [ \d \w \- _ ] + ) \s + ( .* ) $ / ,
157157 CLASS_DIRECTIVE_REGEXP = / ( ( [ \d \w \- _ ] + ) (?: \: ( [ ^ ; ] + ) ) ? ; ? ) / ,
158158 MULTI_ROOT_TEMPLATE_ERROR = 'Template must have exactly one root element. was: ' ,
159- urlSanitizationWhitelist = / ^ \s * ( h t t p s ? | f t p | m a i l t o ) : / ;
159+ urlSanitizationWhitelist = / ^ \s * ( h t t p s ? | f t p | m a i l t o | f i l e ) : / ;
160160
161161
162162 /**
Original file line number Diff line number Diff line change @@ -2484,6 +2484,10 @@ describe('$compile', function() {
24842484 $rootScope . testUrl = "mailto:foo@bar.com" ;
24852485 $rootScope . $apply ( ) ;
24862486 expect ( element . attr ( 'href' ) ) . toBe ( 'mailto:foo@bar.com' ) ;
2487+
2488+ $rootScope . testUrl = "file:///foo/bar.html" ;
2489+ $rootScope . $apply ( ) ;
2490+ expect ( element . attr ( 'href' ) ) . toBe ( 'file:///foo/bar.html' ) ;
24872491 } ) ) ;
24882492
24892493
You can’t perform that action at this time.
0 commit comments