fix: preserve falsy values in escapeHtml
This commit is contained in:
@@ -298,7 +298,7 @@
|
||||
}
|
||||
|
||||
function escapeHtml(str) {
|
||||
if (!str) return '';
|
||||
if (str === null || str === undefined) return '';
|
||||
return String(str)
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
|
||||
Reference in New Issue
Block a user