From 78861aff93db4f705b0dfdaf545c26689593fdec Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Thu, 18 Jul 2019 20:11:58 -0400 Subject: keep urls all lower case --- blog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'blog.c') diff --git a/blog.c b/blog.c index 2685eb2..c46f302 100644 --- a/blog.c +++ b/blog.c @@ -53,7 +53,7 @@ int handle_post(void) char *end = stpcpy(uri, ymd); *end++ = '/'; for (char *f = title; *f != '\0'; f++) { - *end++ = isalnum(*f) ? *f : '-'; + *end++ = isalnum(*f) ? tolower(*f) : '-'; } int newpost = openat(blogdir, uri, O_WRONLY | O_CREAT, 0644); -- cgit v1.2.1