Repository: cure53/DOMPurify (language: javascript)

Issue:
Small syntax enhancement to TMPLIT_EXPR
> This issue proposes a small enhancement to the regexp in the `TMPLIT_EXPR` const.

### Background & Context

`const TMPLIT_EXPR = seal(/\${[\w\W]*}/gm);`

Projects that use XSLT can inline 3rd party libs before pushing out the response to the browser. While doing so they can perform code resolution/substitutions on ${} espressions. Unfortunately the `${[\w\W]*}` part can be misinterpreted as an expression even though it's in a regexp, and because it obviously doesn't resolve to anything during the transformation, it gets wiped out as a result and causes a syntax error when the browser gets it.
Result: `const TMPLIT_EXPR = seal(/\/gm);`

### Proposed workaround

The solution is extremely simple and doesn't change anything to how the regexp operates, and would improve compatibility with a wider range of mission critical projects build on "older" tech like XSLT.
All that is needed is to escape the first curly brace like so:
`const TMPLIT_EXPR = seal(/\$\{[\w\W]*}/gm);`

Would you like me to create a PR for this?



Discussion / hints:
Heya, this looks good from my end, thanks - a PR is welcome :slightly_smiling_face: 
Hi,
Unfortunately my access is read-only, it seems. I can't push my scratch branch.
"Permission to cure53/DOMPurify.git denied to svdb99."
You can just create a PR, then it works as expected :) 

Fix patch:
diff --git a/src/regexp.ts b/src/regexp.ts
index 73786298..2d15f46a 100644
--- a/src/regexp.ts
+++ b/src/regexp.ts
@@ -3,7 +3,7 @@ import { seal } from './utils.js';
 // eslint-disable-next-line unicorn/better-regex
 export const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
 export const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
-export const TMPLIT_EXPR = seal(/\${[\w\W]*}/gm);
+export const TMPLIT_EXPR = seal(/\$\{[\w\W]*}/gm); // eslint-disable-line unicorn/better-regex
 export const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape
 export const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
 export const IS_ALLOWED_URI = seal(


Test patch: