-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[actions] new action parameter escaping breaks existing templates #87344
Comments
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
Here's an example of where the escaping is not going to work right: kibana/x-pack/plugins/monitoring/server/alerts/missing_monitoring_data_alert.ts Lines 173 to 174 in 450d297
kibana/x-pack/plugins/monitoring/server/alerts/missing_monitoring_data_alert.ts Lines 196 to 205 in 450d297
on line 173, the There's a couple of problems here, relating to context variables containing markup for a particular connector:
|
Looking through references to
I think this is all of the monitoring alerts. Looking through the rest of the alerts, I didn't directly see any markup in use, but it's hard to tell due to the indirection used to populate the context variables in solution-specific libraries.
One simple fix, for monitoring, may be to just change the |
Other potential fixes:
The problem with the 3rd option is noted in a comment above. This will end up NOT escaping the text or url in the markdown link, and so could end up not rendering correctly in the end. |
The original monitoring issue that was reported for this is here: issue #84819 In a conversation, it sounds like changing the I think leave this open for a bit longer, in case other problems are noticed, or if the suggested change doesn't work for some reason. |
Also checked with security and observability folks re: context variables with formatting markup, doesn't sound like any of the other alerts are doing this. |
The only broken alerts here seem to be the observability ones - having the links "not rendered" (ie, the markdown formatting is rendered literally) is going to be acceptable for now, with a long term goal of reorganizing the context variables and templates. So, going to close this one out. Any further discussion on the monitoring alerts can go here: #84819 |
We changed the way action parameters have their mustache variables escaped in PR #83919 .
Unfortunately, this appears to break some existing alerts.
Eg, it appears monitoring provides a context variable with a markdown link like
[link text](url-here)
. In the past, the HTML escaping generally would have done nothing with this, but now if you use this in an email, we'll do markdown escaping so the user will see the actual markdown text, instead of the rendered link.We'll need to look through all the alerts to see what else is broken, figure out how to resolve this.
The text was updated successfully, but these errors were encountered: