Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Experimental OFX Parser: XML entities aren't parsed #1872

Closed
1 task done
Bryce-MW opened this issue Nov 7, 2023 · 1 comment · Fixed by #2364
Closed
1 task done

[Bug]: Experimental OFX Parser: XML entities aren't parsed #1872

Bryce-MW opened this issue Nov 7, 2023 · 1 comment · Fixed by #2364
Assignees
Labels
bug Something isn't working experimental feature Related to an experimental feature transaction import Related to manually importing transactions

Comments

@Bryce-MW
Copy link

Bryce-MW commented Nov 7, 2023

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

I import transactions from my banks and credit cards using OFX/QFX. Sometimes payees or memos contain XML entities, often ampersand (as &) but I have at least one that uses angle brackets which are double encoded, showing up at < and >. The double encoding is definitely an issue with my bank since it shows up in the actual qfx file but is displayed properly on their online interface. I have seen the ampersand on multiple banks but not less or greater than signs so I don't know if the double encoding is exclusive to my bank. Unless other people have also encountered the double encoding, I think just doing one round of decoding would be a reasonable idea.

As far as I know, there is no built in way to do the decoding. There is a hacky way that creates a hidden textfield, puts the text in there, and reads it back out, or you can use a library. I'm currently working on another PR but if no one claims this by the time I'm done, I'll work on it.

Here's a zip file containing a qfx file where I have included a couple real entries with those entities that I mentioned. I just changed the amounts.
example.zip

What error did you receive?

No response

Where are you hosting Actual?

Locally via Yarn

What browsers are you seeing the problem on?

Firefox

Operating System

Linux

@Bryce-MW Bryce-MW added the bug Something isn't working label Nov 7, 2023
@joel-jeremy joel-jeremy added help wanted Extra attention is needed experimental feature Related to an experimental feature transaction import Related to manually importing transactions labels Nov 8, 2023
@twk3
Copy link
Contributor

twk3 commented Feb 16, 2024

@Bryce-MW fix prepared in #2364

I happened to also fix the double escaping because it just ends up being a matter of the order you handle the ampersand replacement in.

@github-actions github-actions bot removed the help wanted Extra attention is needed label Feb 17, 2024
@twk3 twk3 self-assigned this Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working experimental feature Related to an experimental feature transaction import Related to manually importing transactions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants