| 1 |
--- |
| 2 |
title: urls.PathUnescape |
| 3 |
description: Returns the given string, replacing all percent-encoded sequences with the corresponding unescaped characters. |
| 4 |
categories: [] |
| 5 |
keywords: [] |
| 6 |
params: |
| 7 |
functions_and_methods: |
| 8 |
returnType: string |
| 9 |
signatures: [urls.PathUnescape INPUT] |
| 10 |
--- |
| 11 |
|
| 12 |
{{< new-in v0.153.0 />}} |
| 13 |
|
| 14 |
The `urls.PathUnescape` function does the inverse transformation of [`urls.PathEscape`][]. |
| 15 |
|
| 16 |
```go-html-template |
| 17 |
{{ urls.PathUnescape "A%2Fb%2Fc%3Fd=%C3%A9&f=g+h" }} → A/b/c?d=é&f=g+h |
| 18 |
``` |
| 19 |
|
| 20 |
Use this function to decode an individual segment within a URL path. |
| 21 |
|
| 22 |
[`urls.PathEscape`]: /functions/urls/PathEscape/ |