Back to Hugo

urls.PathEscape

docs/content/en/functions/urls/PathEscape.md

0.161.1359 B
Original Source

{{< new-in v0.153.0 />}}

The urls.PathEscape function does the inverse transformation of urls.PathUnescape.

go-html-template
{{ urls.PathEscape "my café" }} → my%20caf%C3%A9

Use this function to escape a string so that it can be safely used as an individual segment within a URL path.