refactor(core): remove duplicate check in defaultStyleSanitizer
(#28421)
PR Close #28421
This commit is contained in:
parent
5f9d574d4d
commit
a9a095d44a
@ -139,8 +139,7 @@ export function sanitizeScript(unsafeScript: any): string {
|
|||||||
export const defaultStyleSanitizer = (function(prop: string, value?: string): string | boolean {
|
export const defaultStyleSanitizer = (function(prop: string, value?: string): string | boolean {
|
||||||
if (value === undefined) {
|
if (value === undefined) {
|
||||||
return prop === 'background-image' || prop === 'background' || prop === 'border-image' ||
|
return prop === 'background-image' || prop === 'background' || prop === 'border-image' ||
|
||||||
prop === 'filter' || prop === 'filter' || prop === 'list-style' ||
|
prop === 'filter' || prop === 'list-style' || prop === 'list-style-image';
|
||||||
prop === 'list-style-image';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return sanitizeStyle(value);
|
return sanitizeStyle(value);
|
||||||
@ -149,4 +148,4 @@ export const defaultStyleSanitizer = (function(prop: string, value?: string): st
|
|||||||
function getSanitizer(): Sanitizer|null {
|
function getSanitizer(): Sanitizer|null {
|
||||||
const lView = getLView();
|
const lView = getLView();
|
||||||
return lView && lView[SANITIZER];
|
return lView && lView[SANITIZER];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user