Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prevent error when using quotation marks in BuildMessage
When a PR title or commit summary contains quotation marks, they were not escaped when injected into the JSON attachment. This caused a message like unable to unmarshal webhook message: invalid character 't' after object key:value pair when used inside of a template containing this test: ```json { "text": "*Status*: FAILURE\n*Repo*: {{ .RepositoryName }} | *Branch*: {{ .BuildBranch }} | *Author*: {{ .BuildAuthor }}\n*Build*: {{ .BuildLink }}\n*Message*: {{ .BuildMessage }}" } ``` This change safens this use case. Other typical fields _shouldn't_ have quotation marks in them, but it might be prudent down the line to cleanse _all_ fields as they are injected into the JSON or provide a method usable inside of the template that escapes correctly.
- Loading branch information