Commit webhook fails to escape certain characters properly
Summary
When using mattermost and gitlab integration, certain branch names are not being properly escaped when notifying mattermost.
Steps to reproduce
- Make sure that the integration between the repository your working and mattermost is configured. Specifically, the webhook for commits;
- Create a branch with special characters, such as feature#100;
- Make a commit to that branch;
- Gitlab notifies mattermost correctly, but with an invalid link. In the case above, gitlab constructed the following link:
https://mygitlab/org/repo/commits/feature#100
. - If you follow that link, you'll get an 404.
- The correct link, however is:
https://mygitlab/org/repo/commits/feature%23100
.
Example Project
NA
What is the current bug behavior?
Wrong URL.
What is the expected correct behavior?
Correct URL.
Gitlab version
Gitlab 9.2.2 Omnibus