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

More rich HTML encoding warning #15

Open
PanderMusubi opened this issue Apr 5, 2022 · 6 comments
Open

More rich HTML encoding warning #15

PanderMusubi opened this issue Apr 5, 2022 · 6 comments

Comments

@PanderMusubi
Copy link

The following warning apprears, but I have no idea to where to track it down:

/usr/local/lib/python3.9/dist-packages/genanki/note.py:148: UserWarning: Field contained the following invalid HTML tags. Make sure you are calling html.escape() if your field data isn't already HTML-encoded: <>
  warnings.warn("Field contained the following invalid HTML tags. Make sure you are calling html.escape() if"

Could a line number and/or related line be reported too?

@lukesmurray
Copy link
Owner

hmm yes, i'll try to find a way to report it. It looks like you may be using <> in your document somewhere. Could you try searching your markdown files for that string and let me know if you find anything?

@PanderMusubi
Copy link
Author

Did not find anything, so line number would help a lot.

@PanderMusubi
Copy link
Author

Using this (double) character https://emojipedia.org/flag-united-kingdom/ also results in some warning, but works fine with AnkiDroid.

@lukesmurray
Copy link
Owner

Thank you for reporting the issue @PanderMusubi. I will get to this at some point but have other obligations at the moment which do not leave me enough time to debug and solve this.

@PanderMusubi
Copy link
Author

I also get these warnings, I have no idea what characters they represent:

<7(O^jA>
<LCkve|>
<!%>
<y&,n>

If possible, also print tjhe characters themselves or an Unicode point in hexadecimal format. Thanks.

@lukesmurray
Copy link
Owner

Really want to get to this and apologies for the delay. I am quite busy these days. As always I am open to pull requests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants