diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 80b366766..907d9f612 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -164,6 +164,7 @@ define([ var isArray = common.isArray = $.isArray; var fixHTML = common.fixHTML = function (str) { + if (!str) { return ''; } return str.replace(/[<>&"']/g, function (x) { return ({ "<": "<", ">": ">", "&": "&", '"': """, "'": "'" })[x]; });