Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace html/template with text/template #8

Merged
merged 1 commit into from
Dec 3, 2019
Merged

Replace html/template with text/template #8

merged 1 commit into from
Dec 3, 2019

Conversation

wagdav
Copy link
Contributor

@wagdav wagdav commented Dec 3, 2019

The the html/template package escapes certain special characters such as
". If the messages received from Alertmanager contain these special
characters they will show up HTML-encoded in the chat message.

summary: Server "foo" is down

instead of:

summary: Server "foo" is down

This patch relaces html/template with text/template because there's no
need for special HTML escape rules to generate a notification message.

Resolves #7

Signed-off-by: David Wagner david.wagner@pix4d.com

The the html/template package escapes certain special characters such as
`"`.  If the messages received from Alertmanager contain these special
characters they will show up HTML-encoded in the chat message.

    summary: Server "foo" is down

instead of:

    summary: Server "foo" is down

This patch relaces html/template with text/template because there's no
need for special HTML escape rules to generate a notification message.

Resolves #7

Signed-off-by: David Wagner <david.wagner@pix4d.com>
@mr-karan
Copy link
Owner

mr-karan commented Dec 3, 2019

Thanks @wagdav

@mr-karan mr-karan merged commit 99442b6 into mr-karan:master Dec 3, 2019
@wagdav wagdav deleted the use-text-template branch December 3, 2019 10:43
@wagdav
Copy link
Contributor Author

wagdav commented Dec 3, 2019

@mr-karan Thanks for merging it so fast! Would you please make a patch release with this fix, so we could update our production system?

Thank you!

@mr-karan
Copy link
Owner

mr-karan commented Dec 3, 2019

@wagdav Sure!

docker pull mrkaran/calert:1.1.0

@wagdav
Copy link
Contributor Author

wagdav commented Dec 3, 2019

@wagdav Sure!

docker pull mrkaran/calert:1.1.0

Thank you! I just deployed this 😎 We have also a cluster where we use the raw binary from Github Releases. There, the latest version is v0.1.5. Are you planning to release v1.1.0 there as well?

Thanks again.

@mr-karan
Copy link
Owner

mr-karan commented Dec 4, 2019

It's done. https://github.com/mr-karan/calert/releases/tag/v1.1.0
From now the releases will be automated by Goreleaser :) I should have done this long back!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSON special characters show up escaped
2 participants