mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 22:27:12 -05:00
fixed webkit adding html into cards
This commit is contained in:
parent
eab18e9588
commit
52b92bc967
1 changed files with 3 additions and 0 deletions
|
|
@ -397,6 +397,9 @@ class Editor(object):
|
||||||
def mungeHTML(self, txt):
|
def mungeHTML(self, txt):
|
||||||
if txt == "<br>":
|
if txt == "<br>":
|
||||||
txt = ""
|
txt = ""
|
||||||
|
fa = re.findall('(<font class="Apple-style-span" size="\d+"><span class="Apple-style-span" style="font-size: \d+px;">(.*)</span></font>)', txt)
|
||||||
|
if fa:
|
||||||
|
txt = txt.replace(fa[0][0], fa[0][1])
|
||||||
return txt
|
return txt
|
||||||
|
|
||||||
# Setting/unsetting the current note
|
# Setting/unsetting the current note
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue