commit b077e1cd8c19969bec8dbba889a27c0ae760d3e1 parent e272465f6c8e97f7b8637532922fc6b9a365f293 Author: Dan Stillman <dstillman@zotero.org> Date: Thu, 20 Apr 2017 13:13:12 -0400 Merge pull request #1219 from adomasven:fix/htmlSpecialChars Do not return empty string only for `0` arg to #htmlSpecialChars Diffstat:
| M | chrome/content/zotero/xpcom/utilities.js | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -459,7 +459,9 @@ Zotero.Utilities = { * @return {String} */ "htmlSpecialChars":function(str) { - if (str !== undefined && typeof str != 'string') { + if (str && typeof str != 'string') { + Zotero.debug('#htmlSpecialChars: non-string arguments are deprecated. Update your code', + 1, undefined, true); str = str.toString(); }