Skip to content

Commit

Permalink
fix(NcRichContenteditable): Also quote ids containing a slash
Browse files Browse the repository at this point in the history
This is e.g. the case with guests and groups in talk

Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed May 3, 2023
1 parent ff53ab1 commit 6c5ab3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/NcRichContenteditable/NcMentionBubble.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default {
: null
},
mentionText() {
return this.id.indexOf(' ') === -1
return !this.id.includes(' ') && !this.id.includes('/')
? `@${this.id}`
: `@"${this.id}"`
},
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/richEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default {
// Fallback to @mention in case no data matches
if (!data) {
// return `@${value}`
return value.indexOf(' ') === -1
return !value.includes(' ') && !value.includes('/')
? `@${value}`
: `@"${value}"`
}
Expand Down

0 comments on commit 6c5ab3b

Please sign in to comment.