You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tokens that look like cause OfxPreprocessedFile() to set is_closing_tag=false and is_open_tag=true which, in turn causes re.findall() to fault. This flavor of token appears in the ofx file from my credit union, onpointcu.com. It may be encoded wrong, but the right fix would be a better parse code that does not allow the code to fault.
The fix is to add change OfxPreprocessedFile() so that is_closing_tag accounts for this.
I can push the patch, but I would need permission to push.
--- a/ofxparse/ofxparse.py
+++ b/ofxparse/ofxparse.py
@@ -169,7 +169,7 @@ class OfxPreprocessedFile(OfxFile):
tokens = re.split(r'(?i)(</?[a-z0-9_\.]+>)', ofx_string)
new_fh = StringIO()
for token in tokens:
- is_closing_tag = token.startswith('</')
+ is_closing_tag = token.startswith('</') or token.endswith('/>')
is_processing_tag = token.startswith('<?')
is_cdata = token.startswith('<!')
is_tag = token.startswith('<') and not is_cdata
The text was updated successfully, but these errors were encountered:
tokens that look like cause OfxPreprocessedFile() to set is_closing_tag=false and is_open_tag=true which, in turn causes re.findall() to fault. This flavor of token appears in the ofx file from my credit union, onpointcu.com. It may be encoded wrong, but the right fix would be a better parse code that does not allow the code to fault.
The fix is to add change OfxPreprocessedFile() so that is_closing_tag accounts for this.
I can push the patch, but I would need permission to push.
The text was updated successfully, but these errors were encountered: