File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ function $CompileProvider($provide) {
156
156
COMMENT_DIRECTIVE_REGEXP = / ^ \s * d i r e c t i v e \: \s * ( [ \d \w \- _ ] + ) \s + ( .* ) $ / ,
157
157
CLASS_DIRECTIVE_REGEXP = / ( ( [ \d \w \- _ ] + ) (?: \: ( [ ^ ; ] + ) ) ? ; ? ) / ,
158
158
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 ) : / ;
160
160
161
161
162
162
/**
Original file line number Diff line number Diff line change @@ -2484,6 +2484,10 @@ describe('$compile', function() {
2484
2484
$rootScope . testUrl = "mailto:foo@bar.com" ;
2485
2485
$rootScope . $apply ( ) ;
2486
2486
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' ) ;
2487
2491
} ) ) ;
2488
2492
2489
2493
You can’t perform that action at this time.
0 commit comments