From 0a247a34b172d94806fbf3db902d97f7f1e51091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 14 Mar 2023 11:48:58 +0800 Subject: Generic page anticipates space too --- interchange.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/interchange.c b/interchange.c index 11ab9fc..88d4d10 100644 --- a/interchange.c +++ b/interchange.c @@ -45,7 +45,12 @@ void interchange_init(const char *url, const char *dir, const char *cookie, void interchange_page(const char *path, void (*parser)(interchange_response *)) { - request(parser, NULL, NULL, "%s", path); + char nonspaced[strlen(path) + 1]; + strcpy(nonspaced, path); + char *space = NULL; + while ((space = strchr(nonspaced, ' '))) + *space = '-'; + request(parser, NULL, NULL, "%s", nonspaced); } void interchange_catalog(const char *prod_group, void (*handler)(interchange_response *), void (*callback)(struct interchange_catalog *)) -- cgit v1.2.3