Skip to content

Conversation

@StopMotionCuber
Copy link

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

Copy link
Contributor

@Spaceman1701 Spaceman1701 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no problem with this

  • I don't think adding safeUrl introduces any security concerns that safeHtml doesn't already
  • urlUnescape seems useful

There's certainly a benefit to keeping the number of exposed functions lower, but these functions meet the bar of being generically useful and hard to replicate with what's already provided.

We'll have to wait for a real maintainer to approve before it can be merged.

@StopMotionCuber
Copy link
Author

What's missing for this to be merged?

@StopMotionCuber
Copy link
Author

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

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.

3 participants