Actually use new unescape technique, and fix global variable
This commit is contained in:
parent
e36c975366
commit
a03c10df06
1 changed files with 2 additions and 2 deletions
|
@ -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("<!DOCTYPE html><html></html>",
|
||||
var domDocument = parser.parseFromString("<!DOCTYPE html><html></html>",
|
||||
"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) {
|
||||
|
|
Loading…
Reference in a new issue