Minor issue with apostrophe (single quote) when clicking "assign to me"
Summary
If your user name has an apostrophe in it (single quote) such as with an Irish last name (O'Leary), when you click "Assign to me" the Assignee multi-select text renders the single quote as '
instead of a single quote and you end up with Brendan O&x27;Leary
instead of Brendan O'Leary
,
NOTE: This does not reproduce if you select the person (or yourself) from the dropdown. Thus it is only reproducible if your user has
Steps to reproduce
- Add a single quote to your last name in your profile
- Create a new issue
- Under Assignee, click "Assign to me"
- Observe the
'
Example Project
Any project - hard to provide a link. It reproduces on every project of mine (gitlab.com/boleary) but that's because my name has an apostrophe in it, and it doesn't reproduce if you're assigning from the drop down but only on the "Assign to me" button.
What is the current bug behavior?
Name renders with '
What is the expected correct behavior?
Name should render with a '
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Possible fixes
On line 79 of assets/javascripts/users_select.js, _.escape is run on currentUserInfo.name and assigned to data-meta. This is what the is used for the label and thus causes the issue.