Corrected "generate_url" function
authorThierry Florac <tflorac@ulthar.net>
Mon, 07 Oct 2019 09:14:05 +0200
changeset 401 6088cc1f4ed2
parent 400 c4348fb13621
child 402 2bd11b500946
Corrected "generate_url" function
src/pyams_utils/url.py
--- a/src/pyams_utils/url.py	Fri Oct 04 19:14:47 2019 +0200
+++ b/src/pyams_utils/url.py	Mon Oct 07 09:14:05 2019 +0200
@@ -31,9 +31,9 @@
     shorter than three characters are removed; terms are joined by hyphens.
     """
     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='-').replace('/', '-').split('-')))
+                           translate_string(title.replace('/', '-'), escape_slashes=False,
+                                            force_lower=True, spaces='-', remove_punctuation=True,
+                                            keep_chars='-').split('-')))
 
 
 #