summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-10 22:05:28 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-10 22:12:15 +0200
commit3715152e3a06b58cec422129c33f3d623116d0c0 (patch)
tree9e035477042669e316e61219284b40438cb2d41e
parent03dd65bbc42bf84ce3fc5ebe6532457224569594 (diff)
Fixed URL path decoding issue
One should not decode characters that are reserved for the URL syntax.
-rw-r--r--src/gmutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gmutil.c b/src/gmutil.c
index b08fc26a..0e0cccc5 100644
--- a/src/gmutil.c
+++ b/src/gmutil.c
@@ -181,7 +181,7 @@ void urlDecodePath_String(iString *d) {
181 iString *decoded = new_String(); 181 iString *decoded = new_String();
182 appendRange_String(decoded, (iRangecc){ constBegin_String(d), url.path.start }); 182 appendRange_String(decoded, (iRangecc){ constBegin_String(d), url.path.start });
183 iString *path = newRange_String(url.path); 183 iString *path = newRange_String(url.path);
184 iString *decPath = urlDecode_String(path); 184 iString *decPath = urlDecodeExclude_String(path, "%?/#"); /* don't decode reserved path chars */
185 append_String(decoded, decPath); 185 append_String(decoded, decPath);
186 delete_String(decPath); 186 delete_String(decPath);
187 delete_String(path); 187 delete_String(path);