A local-first personal finance app
improve compatibility with OFX/QFX files (#5203)
Matt Fiddaman0fb9c252ca9c
diff --git a/packages/loot-core/src/server/transactions/import/ofx2json.ts b/packages/loot-core/src/server/transactions/import/ofx2json.tsindex e4036c8271..d93b8929ce 100644--- a/packages/loot-core/src/server/transactions/import/ofx2json.ts+++ b/packages/loot-core/src/server/transactions/import/ofx2json.ts@@ -125,7 +125,7 @@ function mapOfxTransaction(stmtTrn): OFXTransaction {export async function ofx2json(ofx: string): Promise<OFXParseResult> {// firstly, split into the header attributes and the footer sgml- const contents = ofx.split('<OFX>', 2);+ const contents = ofx.split(/<OFX\s?>/, 2);// firstly, parse the headersconst headerString = contents[0].split(/\r?\n/);diff --git a/upcoming-release-notes/5203.md b/upcoming-release-notes/5203.mdnew file mode 100644index 0000000000..9479ddd2d1--- /dev/null+++ b/upcoming-release-notes/5203.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [matt-fidd]+---++Improve compatibility with OFX/QFX files