Open waddles opened 1 year ago
Thank you for the report! Looks like we need to introduce {% unsafe_url var %} jinja built-in function.
I was able to reproduce the issue, this seems to be a backend bug in OnCall. As a workaround, you can try setting the image_url
template to the following value:
{{ payload.image_url | replace("&", "%26") }}
Let me know if this helps 🙂
I was able to reproduce the issue, this seems to be a backend bug in OnCall. As a workaround, you can try setting the
image_url
template to the following value:{{ payload.image_url | replace("&", "%26") }}
Let me know if this helps 🙂
@vadimkerr is doesn't render image, even encoding the &.
What went wrong?
What happened: When triggering a formatted_webhook url for a LibreNMS integration, the payload includes an
image_url
field but when that url contains url params such ashttps://avatars.githubusercontent.com/u/5791783?a=b&foo=bar
the output is rendered ashttps://avatars.githubusercontent.com/u/5791783?a=b&foo=bar
This breaks LibreNMS graph urls (server returns a 500), eg.
The original payload shows correctly when you click the
<>
button in GroupedIncidentsList.What did you expect to happen: Images
src
attributes should not be html entity encoded. It should use the raw url from the JSON payload.How do we reproduce it?
image_url
field that has url parameterssrc
attribute has been html entity encodedSee https://github.com/grafana/oncall/blob/0c7281a2559f59e34a7a8870cceddc78540b5160/grafana-plugin/src/pages/incident/Incident.tsx#L652 and https://github.com/grafana/oncall/blob/0c7281a2559f59e34a7a8870cceddc78540b5160/grafana-plugin/src/pages/incident/Incident.tsx#L772
Grafana OnCall Version
v1.3.37
Product Area
Chatops
Grafana OnCall Platform?
None
User's Browser?
No response
Anything else to add?
No response