Skip to content

Commit

Permalink
Merge pull request zotero#1219 from adomasven:fix/htmlSpecialChars
Browse files Browse the repository at this point in the history
Do not return empty string only for `0` arg to #htmlSpecialChars
  • Loading branch information
dstillman committed Apr 20, 2017
2 parents e272465 + a8d0110 commit b077e1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chrome/content/zotero/xpcom/utilities.js
Expand Up @@ -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();
}

Expand Down

0 comments on commit b077e1c

Please sign in to comment.