Fix rendering status msgs with HTML-unsafe chars

Status messages containing characters like ' or <> were stripped out
in the Account and Member delegates
This commit is contained in:
miruka 2021-04-15 11:43:39 -04:00
parent 18f742966e
commit 3d350910e7
2 changed files with 5 additions and 3 deletions

View File

@ -122,8 +122,9 @@ HTile {
SubtitleLabel {
id: statusMsg
tile: account
text: utils.escapeHtml(model.status_msg.trim())
visible: model.status_msg.trim()
textFormat: SubtitleLabel.PlainText
text: model.status_msg.trim()
visible: Boolean(text)
font.strikeout:
! model.presence_support ||
model.presence.includes("offline") ||

View File

@ -69,11 +69,12 @@ HTile {
SubtitleLabel {
tile: member
textFormat: SubtitleLabel.PlainText
color: theme.chat.roomPane.listView.member.subtitle
text:
model.ignored ?
qsTr("Ignored") :
(utils.escapeHtml(model.status_msg.trim()) || model.id)
(model.status_msg.trim() || model.id)
}
HoverHandler { id: nameHover }