Fix incorrect conversion of documents with bookmarks from pre-2.0b7 format

This commit is contained in:
Simon Kornblith 2009-09-28 06:42:39 +00:00
parent 4bbce8187c
commit 40b1b1da23

View file

@ -1686,12 +1686,12 @@ Zotero.Integration.DocumentData.prototype.unserialize = function(input) {
if(input[0] == "<") {
this.unserializeXML(input);
} else {
const splitRe = /(^|[^\:])\:([^\:]|$)/;
const splitRe = /(^|[^:]):(?!:)/;
var splitOutput = input.split(splitRe);
var prefParameters = [splitOutput[0]+splitOutput[1]];
for(var i=2; i<splitOutput.length; i+=3) {
prefParameters.push((splitOutput[i]+splitOutput[i+1]+splitOutput[i+2]).replace("::", ":", "g"));
var prefParameters = [];
for(var i=0; i<splitOutput.length; i+=2) {
prefParameters.push((splitOutput[i]+(splitOutput[i+1] ? splitOutput[i+1] : "")).replace("::", ":", "g"));
}
this.sessionID = prefParameters[0];