Commit ffdefd7
authored
Fix SyntaxError caused by template literal mangling regex backslashes (#235)
A plain template literal processes escape sequences, turning /\*/g into
/*/g and /\?/g into /?/g — both invalid regexes that cause eval() to
throw "Invalid or unexpected token".
Fix: use String.raw`...` in pac_utils_dump.c so the JS source is stored
verbatim with all backslashes preserved.1 parent e37c557 commit ffdefd7
2 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments