[Advanced bug] Incorrect parsing of < > in generation of fields for card

My version Version ⁨2.1.36 (c505894b)⁩
Python 3.8.6 Qt 5.14.2 PyQt 5.14.2

Problem I am creating notes with genanki but I realised that for some notes which have the characters < /> in them they are partially parsed. So, I’ve checked the collections.anki2 file within the genanki-generate .apkg. (the following refers to the notes table of the Anki sqlite database) .E.g. for the flds value

2-Programming-Techniq...0code out the simplest c++ template for CP?#include <bits/stdc++.h>

using namsepace std;

int main() {
}

where each field is correctly separated by the 0x1f character, I incorrectly get the output shown on the image. **The field is correctly set for other string values, so I was wondering if this is a bug relating to how it escapes < and > character? @kerrickstaley @dae **

I’ve disabled all add-ons to make sure it wasn’t an add-on that incorrectly modified the card.

[note model] based on fields=[ {"name": "CategoryTag"}, {"name": "OrderNumber"}, {"name": "Front"}, {"name": "Back"}, {"name": "Answer"}, {"name": "MyMedia"}, ],

The field contents are HTML, so you should replace < with &lt;.

2 Likes