urls.PathUnescape
Returns the given string, replacing all percent-encoded sequences with the corresponding unescaped characters.
- Syntax
- urls.PathUnescape INPUT
- Returns
- string
Usage
The urls.PathUnescape function returns the given string, replacing all percent-encoded sequences with the corresponding unescaped characters. Use this function to decode a segment within a URL path. The function does not replace plus signs (+) with spaces. The build fails if the string contains an invalid percent-encoded sequence.
The urls.PathEscape function performs the inverse transformation.
Examples
{{ urls.PathUnescape "my%20caf%C3%A9" }} → my café
{{ urls.PathUnescape "A%2Fb%2Fc%3Fd=%C3%A9&f=g+h" }} → A/b/c?d=é&f=g+hLast updated:
November 15, 2026
:
content: Apply style guide to urls functions (7d84f1890)
Improve this page