Milestone with double quotes on the name `"` is never marked as selected in the dropdowns
Summary
We use the milestone name to uniquely identify a milestone, the reason for this is:
the milestone.name is used in the old issue search bar, still being used in https://gitlab.com/dashboard/issues
and we need the ID because we "needed" to specify the name, not a numeric ID, because when filtering by one milestone at the group level, that name could refer to a number of project-level milestones that we'd actually need to filter by.
when we create a milestone with a double quote within the name, we break the query we make to the DOM:https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/assets/javascripts/milestone_select.js#L138 and we never mark it as selected.
what it looks like | what is should look like |
---|---|
Steps to reproduce
- Create a milestone called
"Test"
- In the new issue page, select
"Test"
in the milestone dropdown - Close the dropdown
- Open it again
- It should have a
✔ icon
What is the current bug behavior?
The selected option is not marked as selected
What is the expected correct behavior?
The selected option should be marked as selected
Note: This works properly in the labels dropdown