fix: old safari versions not being able to load the site due to using unsupported regex

This commit is contained in:
Miodec 2023-10-05 10:19:17 +01:00
parent 82a24e4ee7
commit 5373984ec9

View file

@ -237,8 +237,8 @@ function apply(): void {
text = text.replace(/[\u200B-\u200D\u2060\uFEFF]/g, "");
if ($(`${popup} .replaceControlCharacters input`).prop("checked")) {
text = text.replace(/(?<!\\)\\t/gm, "\t");
text = text.replace(/(?<!\\)\\n/gm, "\n");
text = text.replace(/([^\\]|^)\\t/gm, "$1\t");
text = text.replace(/([^\\]|^)\\n/gm, "$1\n");
text = text.replace(/\\\\t/gm, "\\t");
text = text.replace(/\\\\n/gm, "\\n");
}