kelciour / edit-field-during-review

3 stars 1 forks source link

support html #9

Open yivifu opened 3 years ago

yivifu commented 3 years ago

modify function saveField(note, fld, val) to support html:

#......
if fld == "Tags":
        note.tags = txt
else:
        note[fld] = txt
         #add two lines below
        note[fld] = note[fld].replace('&lt;','<')
        note[fld] = note[fld].replace('&gt;','>')
note.flush()