mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Avoid passing the whole unsafe display name to the rich text editor for generating mention pill permalinks
This commit is contained in:
committed by
Stefan Ceriu
parent
2dccfff3e8
commit
0967bb43b4
@@ -431,7 +431,7 @@ final class ComposerToolbarViewModel: ComposerToolbarViewModelType, ComposerTool
|
|||||||
}
|
}
|
||||||
|
|
||||||
if context.composerFormattingEnabled {
|
if context.composerFormattingEnabled {
|
||||||
wysiwygViewModel.setMention(url: url.absoluteString, name: item.displayName ?? item.id, mentionType: .user)
|
wysiwygViewModel.setMention(url: url.absoluteString, name: item.id, mentionType: .user)
|
||||||
} else {
|
} else {
|
||||||
let attributedString = NSMutableAttributedString(attributedString: state.bindings.plainComposerText)
|
let attributedString = NSMutableAttributedString(attributedString: state.bindings.plainComposerText)
|
||||||
mentionBuilder.handleUserMention(for: attributedString, in: suggestion.range, url: url, userID: item.id, userDisplayName: item.displayName)
|
mentionBuilder.handleUserMention(for: attributedString, in: suggestion.range, url: url, userID: item.id, userDisplayName: item.displayName)
|
||||||
|
|||||||
Reference in New Issue
Block a user