markdown-anki-decks icon indicating copy to clipboard operation
markdown-anki-decks copied to clipboard

More rich HTML encoding warning

Open PanderMusubi opened this issue 3 years ago • 6 comments

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?

PanderMusubi avatar Apr 05 '22 12:04 PanderMusubi

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?

lukesmurray avatar Apr 05 '22 13:04 lukesmurray

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

PanderMusubi avatar Apr 10 '22 18:04 PanderMusubi

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

PanderMusubi avatar Apr 14 '22 12:04 PanderMusubi

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.

lukesmurray avatar Apr 14 '22 14:04 lukesmurray

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.

PanderMusubi avatar Apr 18 '22 12:04 PanderMusubi

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!

lukesmurray avatar May 10 '22 15:05 lukesmurray