mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-24 16:49:26 +01:00
importer fixes for ipif and safe in cloud
This commit is contained in:
parent
612ad32722
commit
21ca3abc7e
@ -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,13 +424,25 @@
|
||||
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);
|
||||
|
||||
@ -759,7 +772,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
getXmlFileContents(file, parse, error);
|
||||
getFileContents(file, parse, error);
|
||||
|
||||
function parse(fileContent) {
|
||||
var fileLines = fileContent.split(/(?:\r\n|\r|\n)/);
|
||||
|
Loading…
Reference in New Issue
Block a user