From 35c41e63237c9188179a85235b23645178064e72 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Sun, 15 Oct 2023 22:01:56 +0200 Subject: atom: use valid characters for id --- src/atom.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/atom.scm b/src/atom.scm index c1428ec..6e7a8b2 100644 --- a/src/atom.scm +++ b/src/atom.scm @@ -96,9 +96,10 @@ (contributors '()) (media '()) #:allow-other-keys) + (define valid (char-set-intersection char-set:ascii char-set:letter)) (define (id-from-title title) (string-map (lambda (c) - (if (char-set-contains? char-set:letter c) c #\-)) + (if (char-set-contains? valid c) c #\-)) title)) (%make-entry (or id (id-from-title title)) -- cgit v1.2.3