summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-11-04 19:26:15 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-11-05 10:52:13 -0300
commit4e5731c58becec8043cb2de5c3b9214f1f8cc849 (patch)
tree25d52d82a13970f15985133e45da45fe091fb059 /src/leap/bitmask/gui
parent146e362ade6dddae44e27a0a090c8aae3debe3be (diff)
Support html logs in the logger window.
Escape special characters to display them correctly in the logger window. [Closes #4146]
Diffstat (limited to 'src/leap/bitmask/gui')
-rw-r--r--src/leap/bitmask/gui/loggerwindow.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/leap/bitmask/gui/loggerwindow.py b/src/leap/bitmask/gui/loggerwindow.py
index ad2ceded..6ef58558 100644
--- a/src/leap/bitmask/gui/loggerwindow.py
+++ b/src/leap/bitmask/gui/loggerwindow.py
@@ -19,6 +19,7 @@
History log window
"""
import logging
+import cgi
from PySide import QtGui
@@ -90,7 +91,7 @@ class LoggerWindow(QtGui.QDialog):
logging.CRITICAL: "background: red; color: white; font: bold;"
}
level = log[LeapLogHandler.RECORD_KEY].levelno
- message = log[LeapLogHandler.MESSAGE_KEY]
+ message = cgi.escape(log[LeapLogHandler.MESSAGE_KEY])
if self._logs_to_display[level]:
open_tag = "<tr style='" + html_style[level] + "'>"