summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.rst2
-rw-r--r--changes/bug-4146_logger-window-html-support2
-rw-r--r--src/leap/bitmask/gui/loggerwindow.py3
3 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 09ea992e..38609a46 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -4,6 +4,8 @@ History
-------
0.3.6 Nov 1 -- the "bạn có thể đọc này?" release:
++++++++++++++++++++++++++++++++++++++++++++++++++
+
- Fix problem changing a non-ascii password. Closes #4003.
- Enable password change in the client only if it has started the
correct services. Closes #4093.
diff --git a/changes/bug-4146_logger-window-html-support b/changes/bug-4146_logger-window-html-support
new file mode 100644
index 00000000..27615d86
--- /dev/null
+++ b/changes/bug-4146_logger-window-html-support
@@ -0,0 +1,2 @@
+- Escape logs with html contents so they get displayed in plaintext
+ on the log viewer. Closes #4146.
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] + "'>"