mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
`(?:[^']+|(?<=\\)')+` nests quantifiers and backtracks exponentially on long
unterminated values. Use one `'(?:[^'\\]|\\.)*'` pattern for both extracting
and replacing. Extraction used `(.*?)`, which stopped at the first escaped
quote (`'It\'s'` became `It\`); it now reads the whole value and decodes
JS string escapes (\n, \xHH, \uHHHH, \u{...}, \') before writing the
locale file.
Fixes CodeQL js/redos alerts in scripts/extract-tools-desc.mjs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>