HTML problem Unicode char only when color

Version 2.1.33 (3f403040) - error already in previous version
Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Windows 10

I discovered a weird HTML error both in preview and in the card when reviewing.
I found a nice unicode char “:heavy_check_mark:” and “✗”, and used them on a card. No problem. Everything works fine.

BUT when I colour the char (green / red) suddenly I get an HTML error.

Minimal example (card HTML, works fine, also with additional text, same with second char above):

Minimal example (card HTML, HTML ERROR, also with additional text, same problem occurs with second char above):
<font color="#ff0000">✔</font>

Error message:
Invalid HTML on card: SyntaxError: Unexpected identifier
SyntaxError: Unexpected identifier
at eval ()
at 127.0.0.1:63984/_anki/jquery.js:2:2651
at Function.globalEval (127.0.0.1:63984/_anki/jquery.js:2:2662)
at Ha (127.0.0.1:63984/_anki/jquery.js:3:21262)
at n.fn.init.append (127.0.0.1:63984/_anki/jquery.js:3:22791)
at n.fn.init. (127.0.0.1:63984/_anki/jquery.js:3:24070)
at Y (127.0.0.1:63984/_anki/jquery.js:3:4515)
at n.fn.init.html (127.0.0.1:63984/_anki/jquery.js:3:23660)
at HTMLDivElement. (127.0.0.1:63984/_anki/reviewer.js:33:16)
at HTMLDivElement.d.complete (127.0.0.1:63984/_anki/jquery.js:4:6203)

Why is the colour such a problem? I tried to change the font-tag into div or span, but it doesn’t help. What do I need to do to avoid this error? Thx.

P.S. I had to delete all the protocol http from the error message because I was not allowed to post with all those links.

P.P.S. It looks fine in the editor without any error message.

Works for me.
This is probably an issue with your templates. Click Cards in the editor screen and inspect the HTML of your front and back templates.

Thx. What would I be looking for in my template?

Look for invalid HTML code (div elements specifically).

You can post the templates content here so we can help you.

Use the Preformatted text option to paste the content here.
image

Thx.

I didn’t find the problem yet (maybe post code later) but as a first step I downgraded back to Version 2.1.26 (70784154) because the newest Version causes problems on almost all cards and the slightly older one doesn’t. (I also don’t like the new template editor.)

I’m still not sure why there should be any invalid HTML in the process as I only read content from divs that contained {{text:myfield}}. For the time being I deleted most JS in this note type and it works again.