mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 14:17:13 -05:00
escape HTML when showing errors (#828)
This commit is contained in:
parent
a525d3c32c
commit
340ed59b15
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
import sys
|
import sys
|
||||||
|
import cgi
|
||||||
from aqt.utils import showText, showWarning
|
from aqt.utils import showText, showWarning
|
||||||
|
|
||||||
class ErrorHandler(QObject):
|
class ErrorHandler(QObject):
|
||||||
|
|
@ -43,7 +44,7 @@ class ErrorHandler(QObject):
|
||||||
self.timer.start()
|
self.timer.start()
|
||||||
|
|
||||||
def onTimeout(self):
|
def onTimeout(self):
|
||||||
error = self.pool
|
error = cgi.escape(self.pool)
|
||||||
self.pool = ""
|
self.pool = ""
|
||||||
self.mw.progress.clear()
|
self.mw.progress.clear()
|
||||||
if "abortSchemaMod" in error:
|
if "abortSchemaMod" in error:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue