WebHooks payload with commits featuring single quotes

Hi there,

We have been working on integrating GitLab with one of the cloud providers utilising GitLab’s Webhooks. Specifically we need to use the Push Event webhook type. When using that event type, GitLab includes an array with all the commits in the payload which is sent to the receiving end. However, if one of the commit messages in the repository contains a single quote (for example an apostrophe), then the JSON is not escaped correctly and the receiving end fails due to a malformed JSON object.

Our current workaround was to reword such commit messages, but is there a better solution to it? Could you maybe add proper escaping for such scenarios?

Thank you!

Here’s the GitLab version we are using: 9.5.4