buttercup / buttercup-importer

:fishing_pole_and_fish: 3rd-party archive importer for Buttercup
https://buttercup.pw
MIT License
43 stars 13 forks source link

LastPass: Multi-line field and in-line delimiter problems #14

Closed srccd closed 7 years ago

srccd commented 7 years ago

I utilize the Notes field in LastPass to store comments. Sometimes this field will be multiple lines of text and sometimes it will include a comma (the standard delimiter). LastPass properly exports this field with quotes. However, when I import to Buttercup, the CSV translation fails. Including a sample CSV:

url,username,password,extra,name,grouping,fav
http://test0.com,uname0,pwd0,"This one works.",title0,Category0,0
http://test1.com,uname1,pwd1,"This one does not work due to in line delimiter. Port list: 119, 23, 1818 or 8080; Tested in May 2017, using in line delimiter and line breaks",title1,Category1,0
http://test2.com,uname2,pwd2,"This one does not work due to line breaks.
Line 2.
Line 3.
And so on.",title2,Category2,0
perry-mitchell commented 7 years ago

Thanks @srccd. CSV format does specify that multi-line values may occur within quotes as you've shown. We'll have to get this fixed up.

We should check if the csvjson library we're using supports multiline values. We could fix it upstream if it doesn't.

perry-mitchell commented 7 years ago

Note to add a multiline test case when fixing.