fix: typing in `<` in the input box deletes everything afterwards in

Fixes: #2267
This commit is contained in:
Sale Djenic 2021-06-29 11:58:36 +02:00 committed by Iuri Matias
parent 0774c4d5bf
commit 341d3ebcf7
1 changed files with 3 additions and 1 deletions

View File

@ -319,8 +319,10 @@ Rectangle {
// TODO use the new formatInputMessage function instead
const plainText = getPlainText()
const newText = parseBackText(plainText)
const finalText = newText.replace("<", "&lt;")
messageInputField.remove(0, messageInputField.length)
insertInTextInput(0, newText)
insertInTextInput(0, finalText)
} else {
if (event.key === Qt.Key_Asterisk ||
event.key === Qt.Key_QuoteLeft ||