No need to escape since we sanitize

This commit is contained in:
Joseph Garrone 2024-09-22 22:18:24 +02:00
parent 95e861099f
commit 10d4da9fbf

View File

@ -311,16 +311,7 @@ function createI18nTranslationFunctionsFactory<MessageKey_themeDefined extends s
return;
}
messageWithArgsInjected = messageWithArgsInjected.replace(
new RegExp(`\\{${i + startIndex}\\}`, "g"),
(() => {
if (key === "loginTitleHtml") {
return arg;
}
return arg.replace(/</g, "&lt;").replace(/>/g, "&gt;");
})()
);
messageWithArgsInjected = messageWithArgsInjected.replace(new RegExp(`\\{${i + startIndex}\\}`, "g"), arg);
});
return messageWithArgsInjected;