Merge pull request #1219 from adomasven:fix/htmlSpecialChars

Do not return empty string only for `0` arg to #htmlSpecialChars
This commit is contained in:
Dan Stillman 2017-04-20 13:13:12 -04:00
commit b077e1cd8c

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