mirror of
https://github.com/pi-hole/web.git
synced 2026-04-23 02:09:58 +01:00
Unescape German umlauts (#1914)
* Unescape German umlauts Signed-off-by: Yubiuser <ckoenig@posteo.de>
This commit is contained in:
@@ -31,13 +31,23 @@ function unescapeHtml(text) {
|
||||
">": ">",
|
||||
""": '"',
|
||||
"'": "'",
|
||||
"Ü": "Ü",
|
||||
"ü": "ü",
|
||||
"Ä": "Ä",
|
||||
"ä": "ä",
|
||||
"Ö": "Ö",
|
||||
"ö": "ö",
|
||||
"ß": "ß",
|
||||
};
|
||||
|
||||
if (text === null) return null;
|
||||
|
||||
return text.replace(/&(?:amp|lt|gt|quot|#039);/g, function (m) {
|
||||
return map[m];
|
||||
});
|
||||
return text.replace(
|
||||
/&(?:amp|lt|gt|quot|#039|Uuml|uuml|Auml|auml|Ouml|ouml|szlig);/g,
|
||||
function (m) {
|
||||
return map[m];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// Helper function for converting Objects to Arrays after sorting the keys
|
||||
|
||||
Reference in New Issue
Block a user