Skip to content

Commit

Permalink
Escape HTML in MessageList_SubjectWidget (fixes #1234)
Browse files Browse the repository at this point in the history
  • Loading branch information
g1itch committed Apr 26, 2019
1 parent 38f36d7 commit e3344ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bitmessageqt/foldertree.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"""
# pylint: disable=too-many-arguments,bad-super-call,attribute-defined-outside-init

from cgi import escape

from PyQt4 import QtCore, QtGui

from bmconfigparser import BMConfigParser
Expand Down Expand Up @@ -456,6 +458,8 @@ def data(self, role):
"""Return object data (QT UI)"""
if role == QtCore.Qt.UserRole:
return self.subject
if role == QtCore.Qt.ToolTipRole:
return escape(self.subject)
return super(MessageList_SubjectWidget, self).data(role)

# label (or address) alphabetically, disabled at the end
Expand Down

0 comments on commit e3344ad

Please sign in to comment.