broken GitLab syntax: labels with unicode characters fail to render

~bug

summary

labels with unicode characters can only be referenced as ~ID not ~"label text"

steps to reproduce the issue

  1. go to project/labels
  2. add new label with an unicode character at the start
  3. try mentioning this label in an issue comment as ~"label text"

actual behaviour

label fails to render

example

for a detailed bug description and example, please see this bug report which I have tested and was able to reproduce myself: https://gitlab.com/gitlab-org/gitlab-ce/issues/53468#note_115454396

@toxsick: the issue is that the label is not rendered correctly when it contains emoji's. See the following example. It show's a label containing an emoji referenced by name and by id and another one without emoji. Referencing the label with emoji by name seems to break the rendering.

Bildschirmfoto_2018-11-08_um_09.33.26

Bildschirmfoto_2018-11-08_um_09.25.57

Edited by ChriZilla