/g, ""],
//[/<\/p>(?!\s*$)/g, "\\par{}"],
[/<\/?div[^>]*>/g, ""],
- //[/ /g, " "],
- //[/\u00A0/g, " "],
[/[\x7F-\uFFFF]/g, function(aChar) { return "\\uc0\\u"+aChar.charCodeAt(0).toString()+"{}"}]
];
@@ -343,12 +335,14 @@
}
this.htmlToRTF = function(txt) {
- txt = this.convert("htmlRTF", txt);
+ // Catch this one before is clobbered by unescape
+ txt = txt.replace(/ <\/span>/g, "\\tab{}");
+ txt = Zotero.Utilities.unescapeHTML(txt);
for (var i=0,ilen=this._htmlRTFmap.length; i < ilen; i++) {
var entry = this._htmlRTFmap[i];
txt = txt.replace(entry[0], entry[1]);
}
- txt = Zotero.Utilities.unescapeHTML(txt);
+ txt = this.convert("htmlRTF", txt);
return txt.trim();
}
@@ -358,7 +352,7 @@
txt = txt.replace(entry[0], entry[1]);
}
txt = this.convert("rtfHTML", txt);
- return txt;
+ return txt.trim();
}
this._constructed = true;
@@ -473,12 +467,12 @@