Add a deprecation warning to non-string params for #htmlSpecialChars

Revert change from ff74e0ff
This commit is contained in:
Adomas Venčkauskas 2017-04-20 13:33:16 +03:00 committed by Dan Stillman
parent e272465f6c
commit a8d0110e07

View file

@ -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();
}