summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-09-01 17:21:41 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-09-01 17:21:41 +0300
commit3411bd76743bb95e9cf6f778f913cb5ce077a903 (patch)
tree83c3268ab083bb8177f2e02c44c9bb33618762c9
parent39406e9fae65534cc6db278411869874f4b9381e (diff)
Fixed encoding of % in URL query string
-rw-r--r--src/gmutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gmutil.c b/src/gmutil.c
index 9bd74ee0..9552c2a1 100644
--- a/src/gmutil.c
+++ b/src/gmutil.c
@@ -610,7 +610,7 @@ const iString *canonicalUrl_String(const iString *d) {
610 - all non-reserved characters decoded (i.e., it's an IRI) 610 - all non-reserved characters decoded (i.e., it's an IRI)
611 - expect for spaces, which are always `%20` 611 - expect for spaces, which are always `%20`
612 This means a canonical URL can be used on a gemtext link line without modifications. */ 612 This means a canonical URL can be used on a gemtext link line without modifications. */
613 iString *canon = maybeUrlDecodeExclude_String(d, "/?:;#&= "); 613 iString *canon = maybeUrlDecodeExclude_String(d, "%/?:;#&= ");
614 /* `canon` may now be NULL if nothing was decoded. */ 614 /* `canon` may now be NULL if nothing was decoded. */
615 if (indexOfCStr_String(canon ? canon : d, " ") != iInvalidPos || 615 if (indexOfCStr_String(canon ? canon : d, " ") != iInvalidPos ||
616 indexOfCStr_String(canon ? canon : d, "\n") != iInvalidPos) { 616 indexOfCStr_String(canon ? canon : d, "\n") != iInvalidPos) {