Low: Fix self-XSS in SVGs

This commit is contained in:
binwiederhier
2026-05-17 09:57:41 -04:00
parent 160c916ce0
commit 29113402ce
5 changed files with 22 additions and 15 deletions
+1 -2
View File
@@ -145,8 +145,7 @@ export const hashCode = (s) => {
* which is expected by `<html lang>` and `Intl.DateTimeFormat`. Falls back to "en"
* if the input is missing or not a string.
*/
export const getKebabCaseLangStr = (language) =>
typeof language === "string" && language.length > 0 ? language.replace(/_/g, "-") : "en";
export const getKebabCaseLangStr = (language) => (typeof language === "string" && language.length > 0 ? language.replace(/_/g, "-") : "en");
export const formatShortDateTime = (timestamp, language) =>
new Intl.DateTimeFormat(getKebabCaseLangStr(language), {