summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-07-18 20:11:58 -0400
committerJakob Kaivo <jkk@ung.org>2019-07-18 20:11:58 -0400
commit78861aff93db4f705b0dfdaf545c26689593fdec (patch)
treebb283721cd448e73c922a10c472d628f55f5961c
parent6cc006e821030853640030ded24b11e27f2d4ec7 (diff)
keep urls all lower case
-rw-r--r--blog.c2
1 files changed, 1 insertions, 1 deletions
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);