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

How to configure webhooks with Gotify ? #80

Open
spysir opened this issue Feb 25, 2023 · 2 comments
Open

How to configure webhooks with Gotify ? #80

spysir opened this issue Feb 25, 2023 · 2 comments

Comments

@spysir
Copy link

spysir commented Feb 25, 2023

{
  "title": "[feedpushr]",
  "message": "{{.Content}}",
  "priority": 8
}

It didn't work !
@ncarlier
Copy link
Owner

Did the content contain quotation marks? If so, you need to escape them by using the escapes functions such as {{ .Content | html }} or {{ .Content | js }} or {{ .Content | urlquery }} (see: https://pkg.go.dev/text/template#hdr-Functions)

@StaticRocket
Copy link
Contributor

A better option in this case would be to filter .Content with {{.Content | printf "%q"}} as this will produce a quoted string with all encapsulated quotes properly escaped.

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

No branches or pull requests

3 participants