From a03c10df065bf20e9822f005c6e735ce0e0751a1 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 28 May 2012 18:52:35 -0400 Subject: [PATCH] Actually use new unescape technique, and fix global variable --- chrome/content/zotero/xpcom/utilities.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index 1a5e3a4a33..57588b78d8 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -357,7 +357,7 @@ Zotero.Utilities = { .compare(platformVersion, "12.0") >= 0) { var parser = Components.classes["@mozilla.org/xmlextras/domparser;1"] .createInstance(Components.interfaces.nsIDOMParser); - domDocument = parser.parseFromString("", + var domDocument = parser.parseFromString("", "text/html"); node = domDocument.createElement("div"); } else { @@ -365,7 +365,7 @@ Zotero.Utilities = { } } - if(!node) { + if(node) { node.innerHTML = str; return node.textContent.replace(/ {2,}/g, " "); } else if(!nsIScriptableUnescapeHTML) {