Clip commonly seen labels used for display names to prevent Unicode spam
Unfortunately a pretty common spam/annoyance online is putting "spam" via abusing Unicode symbols - which is used for multilingual support - in display names. This typically results in an unreadable word jumble in our UI, which looks bad. So I decided to put a stop to that by clipping some labels that could be used for this crap. I didn't cover *everything* yet, but this at least prevents these idiots from showing up in the completion menu, the room member list and as authors for messages.
This commit is contained in:
@@ -63,6 +63,7 @@ Kirigami.Dialog {
|
||||
level: 1
|
||||
Layout.fillWidth: true
|
||||
font.bold: true
|
||||
clip: true // Intentional to limit insane Unicode in display names
|
||||
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
|
||||
@@ -92,6 +92,7 @@ QQC2.Popup {
|
||||
Delegates.SubtitleContentItem {
|
||||
itemDelegate: completionDelegate
|
||||
labelItem.textFormat: Text.PlainText
|
||||
labelItem.clip: true // Intentional to limit insane Unicode in display names
|
||||
subtitle: completionDelegate.subtitle ?? ""
|
||||
subtitleItem.textFormat: Text.PlainText
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ RowLayout {
|
||||
textFormat: Text.PlainText
|
||||
font.weight: Font.Bold
|
||||
elide: Text.ElideRight
|
||||
clip: true // Intentional to limit insane Unicode in display names
|
||||
|
||||
function openUserMenu(): void {
|
||||
const menu = Qt.createComponent("org.kde.neochat", "UserMenu").createObject(root, {
|
||||
|
||||
@@ -269,6 +269,7 @@ QQC2.ScrollView {
|
||||
text: userDelegate.name
|
||||
textFormat: Text.PlainText
|
||||
elide: Text.ElideRight
|
||||
clip: true // Intentional to limit insane Unicode in display names
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user