urls.PathEscape
Returns the given string, applying percent-encoding to special characters and reserved delimiters so it can be safely used as a segment within a URL path.
Syntax
urls.PathEscape INPUT
Returns
string
The urls.PathEscape function does the inverse transformation of urls.PathUnescape.
{{ urls.PathEscape "my café" }} → my%20caf%C3%A9Use this function to escape a string so that it can be safely used as an individual segment within a URL path.
Last updated:
March 8, 2026
:
content: Improve urls.PathEscape/PathUnescape examples (32ec89596)
Improve this page