File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1723,7 +1723,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
1723
1723
if ( ( nodeName === 'a' && ( key === 'href' || key === 'xlinkHref' ) ) ||
1724
1724
( nodeName === 'img' && key === 'src' ) ) {
1725
1725
// sanitize a[href] and img[src] values
1726
- this [ key ] = value = $$sanitizeUri ( value , key === 'src' ) ;
1726
+ this [ key ] = value = ( value == null ) ? value : $$sanitizeUri ( value , key === 'src' ) ;
1727
1727
} else if ( nodeName === 'img' && key === 'srcset' && isDefined ( value ) ) {
1728
1728
// sanitize img[srcset] values
1729
1729
var result = '' ;
@@ -1761,7 +1761,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
1761
1761
}
1762
1762
1763
1763
if ( writeAttr !== false ) {
1764
- if ( value === null || isUndefined ( value ) ) {
1764
+ if ( value == null ) {
1765
1765
this . $$element . removeAttr ( attrName ) ;
1766
1766
} else {
1767
1767
if ( SIMPLE_ATTR_NAME . test ( attrName ) ) {
You can’t perform that action at this time.
0 commit comments