Skip to content

Fix SyntaxError caused by template literal mangling regex backslashes#235

Merged
manugarg merged 1 commit intomainfrom
fix_webapp
Feb 10, 2026
Merged

Fix SyntaxError caused by template literal mangling regex backslashes#235
manugarg merged 1 commit intomainfrom
fix_webapp

Conversation

@manugarg
Copy link
Owner

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.

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.
@manugarg manugarg merged commit ffdefd7 into main Feb 10, 2026
27 checks passed
@manugarg manugarg deleted the fix_webapp branch February 10, 2026 07:18
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant