mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-07 23:05:40 -04:00
Update KeePassImporter.cs (#1146)
This commit is contained in:
committed by
Leendert de Borst
parent
2fccb162e6
commit
8cd5118749
@@ -53,6 +53,18 @@ public static class KeePassImporter
|
||||
decoded = Regex.Replace(decoded, @"\\(?![\\\""])", "\"");
|
||||
}
|
||||
|
||||
// Handle edge case where CSV parser incorrectly includes trailing quotes
|
||||
// This happens when the CSV parser gets confused by escaped quotes inside quoted fields
|
||||
if (decoded.EndsWith("\""))
|
||||
{
|
||||
// Check if this is likely a CSV parsing error (trailing quote that shouldn't be there)
|
||||
// Look for patterns like: some content" at the end
|
||||
if (decoded.Length > 1 && !decoded.EndsWith("\"\""))
|
||||
{
|
||||
decoded = decoded.Substring(0, decoded.Length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
return decoded;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user