mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 10:48:26 +00:00
@@ -17,7 +17,8 @@ function escapeHtml(text) {
|
||||
"'": "'",
|
||||
};
|
||||
|
||||
if (text === null) return null;
|
||||
// Return early when text is not a string
|
||||
if (typeof text !== "string") return text;
|
||||
|
||||
return text.replace(/[&<>"']/g, function (m) {
|
||||
return map[m];
|
||||
|
||||
Reference in New Issue
Block a user