Fix CI tests

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König
2023-07-22 16:30:34 +02:00
parent 6bd97e2511
commit 827e96d1d0
2 changed files with 5 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ function escapeHtml(text) {
// Return early when text is not a string
if (typeof text !== "string") return text;
return text.replace(/[&<>"']/g, function (m) {
return text.replaceAll(/[&<>"']/, function (m) {
return map[m];
});
}
@@ -53,8 +53,8 @@ function unescapeHtml(text) {
if (text === null) return null;
return text.replace(
/&(?:amp|lt|gt|quot|#039|Uuml|uuml|Auml|auml|Ouml|ouml|szlig);/g,
return text.replaceAll(
/&(?:amp|lt|gt|quot|#039|Uuml|uuml|Auml|auml|Ouml|ouml|szlig);/,
function (m) {
return map[m];
}