fix(core): CSS sanitizer now allows parens in file names (#30322)

Resolves an issue where images that were created with a name like `'foo (1).png'` would not pass CSS url sanitization.

PR Close #30322
This commit is contained in:
Ben Lesh
2019-05-07 19:03:00 -07:00
committed by Alex Rickabaugh
parent 9a807bd26a
commit 728db88280
2 changed files with 3 additions and 2 deletions

View File

@ -54,7 +54,7 @@ const SAFE_STYLE_VALUE = new RegExp(
* Given the common use case, low likelihood of attack vector, and low impact of an attack, this
* code is permissive and allows URLs that sanitize otherwise.
*/
const URL_RE = /^url\(([^)]+)\)$/;
const URL_RE = /^url\(([\w\W]*)\)$/;
/**
* Checks that quotes (" and ') are properly balanced inside a string. Assumes