Commit e834c6fa authored by Phil Hughes's avatar Phil Hughes

Merge branch 'gmain-pending-comment-escape-fix' into 'master'

Fix escaping characters in authors name for "Pending Comments" dropdown

See merge request gitlab-org/gitlab!63349
parents fd7b3032 2b476879
...@@ -46,9 +46,13 @@ export default { ...@@ -46,9 +46,13 @@ export default {
} }
if (this.discussion) { if (this.discussion) {
return sprintf(__("%{authorsName}'s thread"), { return sprintf(
authorsName: this.discussion.notes.find((note) => !note.system).author.name, __("%{authorsName}'s thread"),
}); {
authorsName: this.discussion.notes.find((note) => !note.system).author.name,
},
false,
);
} }
return __('Your new comment'); return __('Your new comment');
......
...@@ -104,7 +104,7 @@ describe('Batch comments draft preview item component', () => { ...@@ -104,7 +104,7 @@ describe('Batch comments draft preview item component', () => {
notes: [ notes: [
{ {
author: { author: {
name: 'Author Name', name: "Author 'Nick' Name",
}, },
}, },
], ],
...@@ -114,7 +114,7 @@ describe('Batch comments draft preview item component', () => { ...@@ -114,7 +114,7 @@ describe('Batch comments draft preview item component', () => {
it('renders title', () => { it('renders title', () => {
expect(vm.$el.querySelector('.review-preview-item-header-text').textContent).toContain( expect(vm.$el.querySelector('.review-preview-item-header-text').textContent).toContain(
"Author Name's thread", "Author 'Nick' Name's thread",
); );
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment