mirror of
https://github.com/makeworld-the-better-one/amfora.git
synced 2024-11-22 07:23:05 +03:00
URL no longer escaped and unescaped during normalization (#324)
This commit is contained in:
parent
1d257f908a
commit
dba8cbf61b
@ -47,11 +47,6 @@ func normalizeURL(u string) (*url.URL, string) {
|
|||||||
// gemini://example.com -> gemini://example.com/
|
// gemini://example.com -> gemini://example.com/
|
||||||
if parsed.Path == "" {
|
if parsed.Path == "" {
|
||||||
parsed.Path = "/"
|
parsed.Path = "/"
|
||||||
} else {
|
|
||||||
// Decode and re-encode path
|
|
||||||
// This removes needless encoding, like that of ASCII chars
|
|
||||||
// And encodes anything that wasn't but should've been
|
|
||||||
parsed.RawPath = strings.ReplaceAll(url.PathEscape(parsed.Path), "%2F", "/")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do the same to the query string
|
// Do the same to the query string
|
||||||
|
Loading…
Reference in New Issue
Block a user