mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
make sure we escape html chars after type ans comp. (#960)
This commit is contained in:
parent
7eabc36468
commit
fe3ce87020
1 changed files with 3 additions and 3 deletions
|
@ -472,11 +472,11 @@ Please run Tools>Empty Cards""")
|
||||||
"Diff-corrects the typed-in answer."
|
"Diff-corrects the typed-in answer."
|
||||||
givenElems, correctElems = self.tokenizeComparison(given, correct)
|
givenElems, correctElems = self.tokenizeComparison(given, correct)
|
||||||
def good(s):
|
def good(s):
|
||||||
return "<span class=typeGood>"+s+"</span>"
|
return "<span class=typeGood>"+cgi.escape(s)+"</span>"
|
||||||
def bad(s):
|
def bad(s):
|
||||||
return "<span class=typeBad>"+s+"</span>"
|
return "<span class=typeBad>"+cgi.escape(s)+"</span>"
|
||||||
def missed(s):
|
def missed(s):
|
||||||
return "<span class=typeMissed>"+s+"</span>"
|
return "<span class=typeMissed>"+cgi.escape(s)+"</span>"
|
||||||
if given == correct:
|
if given == correct:
|
||||||
res = good(given)
|
res = good(given)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue