ccavanaugh / jgnash

jGnash Personal Finance
http://ccavanaugh.github.io/jgnash/
Other
139 stars 80 forks source link

Problem with ampersand character "&" when importing ofx-file #35

Closed Qaaqqo closed 6 years ago

Qaaqqo commented 6 years ago

Dear ccavanaugh,

when importing an ofx-file containing an ampersand character "&" in the name field of a transaction this transaction and all other below are not imported/ proposed to import.

Here you find a corresponding test file: bank2.ofx.zip

I use jgnash 2.33.1 with Oracle Java 8 on Linux.

Is it a bug?

Thanks for your support!

Qaaqqo

ccavanaugh commented 6 years ago

The supplied file is a bit mangled in that I would expect a line break after the &. This will cause some confusion with the SGML to XML parser.

<NAME>To Share xx &<MEMO>Withdrawal Transfer Home Banking

vs.

<NAME>To Share xx &
<MEMO>Withdrawal Transfer Home Banking

Is the lack of the line break actual data or a typo from hand editing a sample? I want to make sure I'm not chasing ghosts.

Thanks!

Qaaqqo commented 6 years ago

The problem occurs even with a line break after the "&".

The problem does not occur without the "&" but without line break before the MEMO-Tag.

Thus the problem seems to be the "&" character (or some broader parsing or encoding problem).

Best wishes

ccavanaugh commented 6 years ago

The soon to be released 2.33.2 version of jGnash will correctly handle the & symbol.