slack notification messages not escaped

apparently [] need to be escaped when posting via slack webhook

GitLab APP glen opened [!37 *do things [DVID-102]*](https://gitlab.example.net/group/project/merge_requests/37) in group/project: *do things [DVID-102]*

should be:

GitLab APP glen opened !37 do things [DVID-102] in group/project: do things [DVID-102]

the examples are text only putput, what i see in slack chat, as you see unescaped [] makes whole slack formatting passing it as is.

slack docks: https://api.slack.com/docs/message-formatting

to reproduce:

  1. configure slack hook
  2. create message that contains [] in it (mr with such title or commit message)

Note

This issue should be either solved by another issue / addressed when we move away from webhook based notifications to in-app notifications, see: Support Slack notifications in the app

Edited by Libor Vanc