kerchen / kerchen/export_gr2evernote

Unclosed tags prevent notes from syncing

Open
#14 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
64
Forks
10
PR merge metrics
No merged PRs in 30d

Description

The HTML of some imported articles contains unclosed tags which then prevent the notes from syncing with the Evernote servers.

I have found the following code useful for solving this problem:

``` python
# Make sure img, br, and hr tags are closed
html = re.sub(r'(', r'\1 />', content, flags=re.IGNORECASE)
html = re.sub(r'(', r'\1 />', html, flags=re.IGNORECASE)
html = re.sub(r'(', r'\1 />', html, flags=re.IGNORECASE)

# Make sure ismap attribute is defined correctly
html = re.sub(r'\sismap\s', ' ismap="ismap" ', html, flags=re.IGNORECASE)
```

Unfortunately, I still have an issue syncing notes that contain iframes. The Evernote Activity Log says:
EDAMUserException: errorCode=ENML_VALIDATION parameter="Element type "iframe" must be declared."

Contributor guide

No contributing guide indexed for this repository

Research direction

Start from the HTML normalization code described in the issue and trace the import path that sends article notes to Evernote. Reproduce the failure with an imported note containing an iframe, then consult the Evernote Activity Log and ENML validation behavior. Done means affected notes sync successfully without the reported validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.