Fix security vulnerabilities

This commit is contained in:
2026-10-13 15:52:34 +01:00
parent 74103a19c9
commit eefb2ea5d2
46 changed files with 375 additions and 403 deletions
+8
View File
@@ -0,0 +1,8 @@
/**
* # Serialize a value as JSON that is safe to embed in an inline `<script>`
*
* Escapes `<`, `>`, `&`, U+2028 and U+2029 so the payload can never close
* the script tag (`</script>`), open an HTML comment (`<!--`) or otherwise
* change the HTML parser state.
*/
export default function serializeForScript(value: any): string;