Commit 2b476879 authored by George Main IV's avatar George Main IV

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

Changelog: fixed
parent acd3831e
......@@ -46,9 +46,13 @@ export default {
}
if (this.discussion) {
return sprintf(__("%{authorsName}'s thread"), {
return sprintf(
__("%{authorsName}'s thread"),
{
authorsName: this.discussion.notes.find((note) => !note.system).author.name,
});
},
false,
);
}
return __('Your new comment');
......
......@@ -104,7 +104,7 @@ describe('Batch comments draft preview item component', () => {
notes: [
{
author: {
name: 'Author Name',
name: "Author 'Nick' Name",
},
},
],
......@@ -114,7 +114,7 @@ describe('Batch comments draft preview item component', () => {
it('renders title', () => {
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