forked from openlp/openlp
Converts <> marks to <> to make it impossible to insert HTML to alerts.
Fixes: https://launchpad.net/bugs/908197
This commit is contained in:
parent
e59d5b014b
commit
b48dda3c74
@ -240,12 +240,14 @@ class MainDisplay(Display):
|
|||||||
not self.isVisible():
|
not self.isVisible():
|
||||||
shrink = True
|
shrink = True
|
||||||
js = u'show_alert("%s", "%s")' % (
|
js = u'show_alert("%s", "%s")' % (
|
||||||
text.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"'),
|
text.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"')
|
||||||
|
.replace(u'<', u'<').replace(u'>', u'>'),
|
||||||
u'top')
|
u'top')
|
||||||
else:
|
else:
|
||||||
shrink = False
|
shrink = False
|
||||||
js = u'show_alert("%s", "")' % (
|
js = u'show_alert("%s", "")' % (
|
||||||
text.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"'))
|
text.replace(u'\\', u'\\\\').replace(u'\"', u'\\\"')
|
||||||
|
.replace(u'<', u'<').replace(u'>', u'>'))
|
||||||
height = self.frame.evaluateJavaScript(js)
|
height = self.frame.evaluateJavaScript(js)
|
||||||
if shrink:
|
if shrink:
|
||||||
if text:
|
if text:
|
||||||
|
Loading…
Reference in New Issue
Block a user