From ff74e0ff00832f9f2c80b869525fcc12a2d3ccf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Tue, 18 Apr 2017 16:21:09 +0300 Subject: [PATCH] Do not return empty string for falsy arguments in Utilities.htmlSpecialChars --- chrome/content/zotero/xpcom/utilities.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index 15a91dda95..691e0daa67 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -459,7 +459,7 @@ Zotero.Utilities = { * @return {String} */ "htmlSpecialChars":function(str) { - if (str && typeof str != 'string') { + if (str !== undefined && typeof str != 'string') { str = str.toString(); }