Fix null string escape

master
proller 2014-02-24 20:41:04 +04:00
parent f6232d71b6
commit d4be81155e
1 changed files with 1 additions and 0 deletions

View File

@ -23,6 +23,7 @@ function humanTime(seconds) {
}
function escapeHTML(str) {
if(!str) return str;
return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
}