commit 461225ac1546f17fbc3b51b7df59c8c9d308dfc6 parent d8868cd9cbfbf5bc3f21fe4db1173b946efa31c3 Author: Dan Stillman <dstillman@zotero.org> Date: Fri, 20 Jun 2008 17:48:46 +0000 Addreses #1047, Timeline items not displaying Sean, can you verify that this fixes the problem? Diffstat:
| M | chrome/content/zotero/xpcom/utilities.js | | | 12 | ++++++++++-- |
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -156,8 +156,16 @@ Zotero.Utilities.prototype.cleanTags = function(x) { * <ZOTEROHELLIP/> => … */ Zotero.Utilities.prototype.htmlSpecialChars = function(str) { - if (typeof str != 'string') { - throw "Argument '" + str + "' must be a string in Zotero.Utilities.htmlSpecialChars()"; + switch (typeof str) { + case 'string': + break; + + case 'number': + str = str + ''; + break; + + default: + throw "Argument '" + str + "' must be a string in Zotero.Utilities.htmlSpecialChars()"; } if (!str) {