alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

Add templating functions for working with URLs

Open StopMotionCuber opened this issue 2 months ago • 2 comments

This is adding 2 functions to templating to improve ability to work with URLs in templates.

These functions are

  • safeUrl (the same as safeHtml, but for URLs)
  • urlUnescape (transforming stuff like %20 to blanks)

For relevant context on why I need that, see #4616. I'm also fine with dropping either of the functions for my issue. safeUrl might have some security implications, while urlUnescape can already be implemented quite inefficiently with a long chain of reReplaceAll and therefore should have less security implications

StopMotionCuber avatar Oct 22 '25 11:10 StopMotionCuber

What's missing for this to be merged?

StopMotionCuber avatar Nov 04 '25 08:11 StopMotionCuber

I kinda fatfingered closing this PR (some weird keyboard shortcuts while trying to type). Well, to repeat the question above, what's missing here to get this merged? Kinda bummer that this didn't make it into the last release, especially as the alertmanager release cycle is rather slow

StopMotionCuber avatar Nov 04 '25 08:11 StopMotionCuber

I'm planning to push some more frequent / regular releases for all of the changes we're making.

SuperQ avatar Nov 05 '25 17:11 SuperQ