summaryrefslogtreecommitdiff
path: root/src/gmrequest.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-02 18:19:30 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-02 18:19:30 +0200
commita4bfb9306343a0801a85cafb20896e2476b31d5c (patch)
tree6f8c964ecf645ee4b1a92c069b4a110a560be6ed /src/gmrequest.c
parent5dac1beb7bd29604142988961d69ac2c17be1f86 (diff)
Stripping the URL fragment
Lagrange will retain URL fragments when parsing gemtext, but will strip them when making requests or when a DocumentWidget's URL is set. This allows opening URLs with fragments in an external browser. IssueID #128
Diffstat (limited to 'src/gmrequest.c')
-rw-r--r--src/gmrequest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gmrequest.c b/src/gmrequest.c
index a1cf1a8e..8626403f 100644
--- a/src/gmrequest.c
+++ b/src/gmrequest.c
@@ -493,7 +493,7 @@ void deinit_GmRequest(iGmRequest *d) {
493} 493}
494 494
495void setUrl_GmRequest(iGmRequest *d, const iString *url) { 495void setUrl_GmRequest(iGmRequest *d, const iString *url) {
496 set_String(&d->url, url); 496 set_String(&d->url, urlFragmentStripped_String(url));
497 /* Encode hostname to Punycode here because we want to submit the Punycode domain name 497 /* Encode hostname to Punycode here because we want to submit the Punycode domain name
498 in the request. (TODO: Pending possible Gemini spec change.) */ 498 in the request. (TODO: Pending possible Gemini spec change.) */
499 punyEncodeUrlHost_String(&d->url); 499 punyEncodeUrlHost_String(&d->url);