1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-14 02:08:50 +02:00

importer fixes for ipif and safe in cloud

This commit is contained in:
Kyle Spearrin 2017-05-04 15:56:45 -04:00
parent 612ad32722
commit 21ca3abc7e

View File

@ -404,7 +404,7 @@
uri: null,
username: null,
password: null,
notes: null,
notes: '',
name: card.attr('title'),
};
@ -414,6 +414,7 @@
var text = field.text();
var type = field.attr('type');
var name = field.attr('name');
if (text && text !== '') {
if (type === 'login') {
@ -423,14 +424,26 @@
login.password = text;
}
else if (type === 'notes') {
login.notes = text;
login.notes += (text + '\n');
}
else if (type === 'weblogin') {
else if (type === 'weblogin' || type === 'website') {
login.uri = trimUri(text);
}
else {
login.notes += (name + ': ' + text + '\n');
}
}
}
var notes = card.find('> notes');
for (j = 0; j < notes.length; j++) {
login.notes += ($(notes[j]).text() + '\n');
}
if (login.notes === '') {
login.notes = null;
}
logins.push(login);
labels = card.find('> label_id');
@ -759,7 +772,7 @@
}
}
getXmlFileContents(file, parse, error);
getFileContents(file, parse, error);
function parse(fileContent) {
var fileLines = fileContent.split(/(?:\r\n|\r|\n)/);