lukesmurray / markdown-anki-decks

Tool for converting markdown files into anki decks
MIT License
126 stars 12 forks source link

More rich HTML encoding warning #15

Open PanderMusubi opened 2 years ago

PanderMusubi commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

PanderMusubi commented 2 years ago

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

lukesmurray commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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!