Skip to content

Commit

Permalink
Avoid passing the whole unsafe display name to the rich text editor f…
Browse files Browse the repository at this point in the history
…or generating mention pill permalinks
  • Loading branch information
stefanceriu committed Jun 14, 2024
1 parent 2dccfff commit 0967bb4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ final class ComposerToolbarViewModel: ComposerToolbarViewModelType, ComposerTool
}

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 {
let attributedString = NSMutableAttributedString(attributedString: state.bindings.plainComposerText)
mentionBuilder.handleUserMention(for: attributedString, in: suggestion.range, url: url, userID: item.id, userDisplayName: item.displayName)
Expand Down

0 comments on commit 0967bb4

Please sign in to comment.