fix(security): allow empty CSS values. (#9675)
This commit is contained in:
@ -82,6 +82,7 @@ function hasBalancedQuotes(value: string) {
|
||||
*/
|
||||
export function sanitizeStyle(value: string): string {
|
||||
value = String(value).trim(); // Make sure it's actually a string.
|
||||
if (!value) return '';
|
||||
|
||||
// Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for
|
||||
// reasoning behind this.
|
||||
|
Reference in New Issue
Block a user