Replace remaining slashes with dashes when generating content's URL
authorThierry Florac <tflorac@ulthar.net>
Fri, 04 Oct 2019 18:58:38 +0200
changeset 398 f87a8558edcc
parent 397 b95d1ef81476
child 399 088dadea87f7
Replace remaining slashes with dashes when generating content's URL
src/pyams_utils/url.py
--- a/src/pyams_utils/url.py	Thu Sep 26 11:53:53 2019 +0200
+++ b/src/pyams_utils/url.py	Fri Oct 04 18:58:38 2019 +0200
@@ -33,7 +33,7 @@
     return '-'.join(filter(lambda x: len(x) >= min_word_length,
                            translate_string(title, escape_slashes=False, force_lower=True,
                                             spaces='-', remove_punctuation=True,
-                                            keep_chars='-').split('-')))
+                                            keep_chars='-').replace('/', '-').split('-')))
 
 
 #