aboutsummaryrefslogtreecommitdiffhomepage
path: root/utilities.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'utilities.lisp')
-rw-r--r--utilities.lisp5
1 files changed, 3 insertions, 2 deletions
diff --git a/utilities.lisp b/utilities.lisp
index 0e258b6..a7e90e4 100644
--- a/utilities.lisp
+++ b/utilities.lisp
@@ -128,5 +128,6 @@
(apply then args)
(apply else args))))
-(defun clean-slashes (str)
- (cl-ppcre:regex-replace-all "/" str "-"))
+(defun clean-filename (str)
+ (let ((non-safe-chars (cl-ppcre:create-scanner "[^a-zA-Z0-9_\\-.]")))
+ (cl-ppcre:regex-replace-all non-safe-chars str "-")))