mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Fix null string escape
This commit is contained in:
@@ -23,6 +23,7 @@ function humanTime(seconds) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function escapeHTML(str) {
|
function escapeHTML(str) {
|
||||||
|
if(!str) return str;
|
||||||
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user