Add templating functions for working with URLs#4625
Conversation
Spaceman1701
left a comment
There was a problem hiding this comment.
I see no problem with this
- I don't think adding
safeUrlintroduces any security concerns thatsafeHtmldoesn't already urlUnescapeseems 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.
|
What's missing for this to be merged? |
|
I kinda fatfingered closing this PR (some weird keyboard shortcuts while trying to type). |
Signed-off-by: Ruben Simons <r.simons@fz-juelich.de>
Signed-off-by: Ruben Simons <r.simons@fz-juelich.de>
58d32e3 to
e93fadd
Compare
|
I'm planning to push some more frequent / regular releases for all of the changes we're making. |
This is adding 2 functions to templating to improve ability to work with URLs in templates.
These functions are
safeUrl(the same assafeHtml, but for URLs)urlUnescape(transforming stuff like%20to blanks)For relevant context on why I need that, see #4616. I'm also fine with dropping either of the functions for my issue.
safeUrlmight have some security implications, whileurlUnescapecan already be implemented quite inefficiently with a long chain ofreReplaceAlland therefore should have less security implications