Skip to content

Commit

Permalink
disallow rich text content in reply box
Browse files Browse the repository at this point in the history
  • Loading branch information
deeplow committed Oct 23, 2019
1 parent 559fb10 commit 4e33e39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from PyQt5.QtGui import QIcon, QPalette, QBrush, QColor, QFont, QLinearGradient
from PyQt5.QtWidgets import QListWidget, QLabel, QWidget, QListWidgetItem, QHBoxLayout, \
QPushButton, QVBoxLayout, QLineEdit, QScrollArea, QDialog, QAction, QMenu, QMessageBox, \
QToolButton, QSizePolicy, QTextEdit, QStatusBar, QGraphicsDropShadowEffect, QApplication
QToolButton, QSizePolicy, QPlainTextEdit, QStatusBar, QGraphicsDropShadowEffect, QApplication

from securedrop_client.db import Source, Message, File, Reply, User
from securedrop_client.storage import source_exists
Expand Down Expand Up @@ -2229,7 +2229,7 @@ class ReplyBoxWidget(QWidget):
#replybox {
background-color: #ffffff;
}
QTextEdit {
QPlainTextEdit {
font-family: 'Montserrat';
font-weight: 400;
font-size: 18px;
Expand Down Expand Up @@ -2286,7 +2286,7 @@ def __init__(self, source: Source, controller: Controller) -> None:
replybox_layout.setSpacing(0)

# Create relybox widgets
self.text_edit = QTextEdit()
self.text_edit = QPlainTextEdit()

self.send_button = QPushButton()
self.send_button.clicked.connect(self.send_reply)
Expand Down Expand Up @@ -2318,7 +2318,7 @@ def enable(self):
self.send_button.show()

def disable(self):
self.text_edit.setText(_('You need to log in to send replies.'))
self.text_edit.setPlainText(_('You need to log in to send replies.'))
self.text_edit.setEnabled(False)
self.send_button.hide()

Expand Down

0 comments on commit 4e33e39

Please sign in to comment.