Skip to content

Tasks with non-breaking space can't be marked as completed

Summary

In merge request and issues, task list with non-breaking space can't be marked as completed.

  • NO-BREAK SPACE (U+00A0)
  • FIGURE SPACE (U+2007)
  • NARROW NO-BREAK SPACE (U+202F)
  • THIN SPACE (U+2009)

Steps to reproduce

  1. Create a new issue or merge request with the following description:
- [ ] NO-BREAK SPACE (U+00A0)
- [ ] FIGURE SPACE (U+2007)
- [ ] NARROW NO-BREAK SPACE (U+202F)
- [ ] THIN SPACE (U+2009)
  1. Try to check any of the checkbox.

As far as I know, the last three examples are unlikely to happened by accident. But the first one happens to me a lot by mistake. It's easy to type ALT+SPACE (at least on Mac Belgian AZERTY, don't know about other layouts) for a non-breaking space, instead a normal one.

Example Project

This issue is an example in it-self.

What is the current bug behavior?

This alert message appears, and the task is not updated

Someone edited this issue at the same time you did. The description has been updated and you will need to make your changes again.

What is the expected correct behavior?

The task should be marked as completed and the description should be updated.

Relevant logs and/or screenshots

Capture_d_écran_du_2022-02-13_09-37-52

Output of checks

This bug happens on GitLab.com

Possible fixes

Fix the regexp in https://gitlab.com/gitlab-org/gitlab/blob/5996af64a36b1f20de6620722372ff4f4190e076/app/models/concerns/taskable.rb#L16

Edited by Thomas Chandelle