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

Converts html special characters in ofx values to plaintext #2364

Merged
merged 2 commits into from
Feb 17, 2024

Conversation

twk3
Copy link
Contributor

@twk3 twk3 commented Feb 16, 2024

Summary

Converts things like & and < back into plaintext when encountered in qfx/ofx memo or name fields during import.

Issue

Fixes #1872

Details

One downside is that users that have payees that are impacted by these characters are going to all of a sudden have additional non-matched payees added when importing with this in place.

Though this could just as easily happen if the banks with these issues fixed their exporters at any point to only have plaintext to begin with.

This change also happens to apply the ampersand replacement in an order that fixes order replacement issues in the source data. (where they did their ampersand replacement after already doing their LT/GT replacement.)

Tests

The example file provided in the issue has been added here as a new test mock.

@trafico-bot trafico-bot bot added the 🚧 WIP label Feb 16, 2024
Copy link

netlify bot commented Feb 16, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 00742b0
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/65ceabdff48e260008142c7f
😎 Deploy Preview https://deploy-preview-2364.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Feb 16, 2024

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
10 4.44 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/ButtonLink.js 379 B 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/BalanceTooltip.js 6.06 kB 0%
static/js/MenuTooltip.js 20 kB 0%
static/js/narrow.js 79.83 kB 0%
static/js/wide.js 267.43 kB 0%
static/js/ReportRouter.js 1.2 MB 0%
static/js/index.js 2.73 MB 0%

Copy link
Contributor

github-actions bot commented Feb 16, 2024

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.2 MB → 1.2 MB (+165 B) +0.01%
Changeset
File Δ Size
packages/loot-core/src/server/accounts/ofx2json.ts 📈 +384 B (+9.05%) 4.14 kB → 4.52 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
kcab.worker.js 1.2 MB → 1.2 MB (+165 B) +0.01%

Smaller

No assets were smaller

Unchanged

No assets were unchanged

packages/loot-core/src/server/accounts/ofx2json.ts Dismissed Show resolved Hide resolved
packages/loot-core/src/server/accounts/ofx2json.ts Dismissed Show dismissed Hide dismissed
@twk3 twk3 changed the title WIP:Converts html special characters in ofx values to plaintext Converts html special characters in ofx values to plaintext Feb 16, 2024
Copy link
Member

@MatissJanis MatissJanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the unit tests!

@twk3 twk3 merged commit d0c11cd into master Feb 17, 2024
19 checks passed
@twk3 twk3 deleted the twk3/html2plain-ofxparse branch February 17, 2024 18:49
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved labels Feb 17, 2024
FlorianLang06 pushed a commit to FlorianLang06/actual that referenced this pull request Mar 7, 2024
…dget#2364)

* Converts html special characters in ofx values to plaintext

- Apply during ofx/qfx import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Experimental OFX Parser: XML entities aren't parsed
2 participants