commit a8d0110e075464ceb2ff2fdc55822e2747ab4948 parent e272465f6c8e97f7b8637532922fc6b9a365f293 Author: Adomas VenĨkauskas <adomas.ven@gmail.com> Date: Thu, 20 Apr 2017 13:33:16 +0300 Add a deprecation warning to non-string params for #htmlSpecialChars Revert change from ff74e0ff 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(); }