{"html_url": "https://github.com/dogsheep/evernote-to-sqlite/issues/13#issuecomment-906646452", "issue_url": "https://api.github.com/repos/dogsheep/evernote-to-sqlite/issues/13", "id": 906646452, "node_id": "IC_kwDOEhK-wc42ClO0", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-08-26T18:34:34Z", "updated_at": "2021-08-26T18:35:20Z", "author_association": "MEMBER", "body": "I tried this ampersand fix: https://regex101.com/r/ojU2H9/1\r\n```python\r\n\r\n# https://regex101.com/r/ojU2H9/1\r\n_invalid_ampersand_re = re.compile(r'&(?![a-z0-9]+;)')\r\n\r\ndef fix_bad_xml(xml):\r\n # More fixes for things like '&' not as part of an entity\r\n return _invalid_ampersand_re.sub('&', xml)\r\n```\r\n\r\nEven with that I'm still getting total garbage in the `` content - it's just HTML, not even trying to be XML.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 978743426, "label": "xml.etree.ElementTree.ParseError: not well-formed (invalid token)"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/evernote-to-sqlite/issues/13#issuecomment-906635938", "issue_url": "https://api.github.com/repos/dogsheep/evernote-to-sqlite/issues/13", "id": 906635938, "node_id": "IC_kwDOEhK-wc42Ciqi", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-08-26T18:18:27Z", "updated_at": "2021-08-26T18:18:27Z", "author_association": "MEMBER", "body": "It looks like I was using the round-trip to dump the `` and `\r\n\r\n\r\n

\r\n \r\n Q3 2018 Reflection & Development\r\n \r\n

\r\n ...\r\n```\r\nYeah that is not valid XML!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 978743426, "label": "xml.etree.ElementTree.ParseError: not well-formed (invalid token)"}, "performed_via_github_app": null}