fix: preserve falsy values in escapeHtml

This commit is contained in:
Christian Krakau-Louis
2026-05-31 05:38:41 +02:00
parent 0cf8108ff0
commit 37c27c0213
+1 -1
View File
@@ -298,7 +298,7 @@
}
function escapeHtml(str) {
if (!str) return '';
if (str === null || str === undefined) return '';
return String(str)
.replace(/&/g, '&')
.replace(/</g, '&lt;')