From a8d0110e075464ceb2ff2fdc55822e2747ab4948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Thu, 20 Apr 2017 13:33:16 +0300 Subject: [PATCH] Add a deprecation warning to non-string params for #htmlSpecialChars Revert change from ff74e0ff --- 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 index 691e0daa67..8c28e5b141 100644 --- 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(); }