fix(Chat/Communities): Don't allow HTML in communities name and description

Changes:

- Don't allow HTML tag special characters in Saved Addresses
- Don't show rich text in community description

Fixes: #4961
This commit is contained in:
Stefan D 2022-03-28 15:53:50 +03:00 committed by Stefan Dunca
parent 51e31f3d42
commit 768b10e03f
3 changed files with 12 additions and 4 deletions

View File

@ -39,6 +39,7 @@ Column {
font.pixelSize: 15
color: Theme.palette.directColor1
wrapMode: Text.Wrap
textFormat: Text.PlainText
}
}

View File

@ -72,6 +72,7 @@ StatusModal {
color: Theme.palette.directColor1
wrapMode: Text.WordWrap
width: parent.width
textFormat: Text.PlainText
}
StatusIcon {

View File

@ -94,10 +94,16 @@ StatusModal {
label: qsTr("Name your community")
charLimit: maxCommunityNameLength
input.placeholderText: qsTr("A catchy name")
validators: [StatusMinLengthValidator {
minLength: 1
errorMessage: Utils.getErrorMessage(nameInput.errors, "community name")
}]
validators: [
StatusMinLengthValidator {
minLength: 1
errorMessage: Utils.getErrorMessage(nameInput.errors, "community name")
},
StatusRegularExpressionValidator {
regularExpression: /^[^<>]+$/
errorMessage: qsTr("This is not a valid community name")
}
]
validationMode: StatusInput.ValidationMode.Always
}