summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-14 11:48:58 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-14 11:48:58 +0800
commit0a247a34b172d94806fbf3db902d97f7f1e51091 (patch)
tree62c61012e3d06e995065d9ec68f25b20e55c04cd
parent4cc4f351bfd20e15150fbe4e5506b6db31413942 (diff)
Generic page anticipates space too
-rw-r--r--interchange.c7
1 files changed, 6 insertions, 1 deletions
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 *))