mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
replaceAll() requires a global regex (#2653)
This commit is contained in:
@@ -19,7 +19,7 @@ function escapeHtml(text) {
|
||||
|
||||
if (text === null) return null;
|
||||
|
||||
return text.replaceAll(/[&<>"']/, function (m) {
|
||||
return text.replaceAll(/[&<>"']/g, function (m) {
|
||||
return map[m];
|
||||
});
|
||||
}
|
||||
@@ -43,7 +43,7 @@ function unescapeHtml(text) {
|
||||
if (text === null) return null;
|
||||
|
||||
return text.replaceAll(
|
||||
/&(?:amp|lt|gt|quot|#039|Uuml|uuml|Auml|auml|Ouml|ouml|szlig);/,
|
||||
/&(?:amp|lt|gt|quot|#039|Uuml|uuml|Auml|auml|Ouml|ouml|szlig);/g,
|
||||
function (m) {
|
||||
return map[m];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user