gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-merchant-demos] branch master updated: no special character


From: gnunet
Subject: [taler-taler-merchant-demos] branch master updated: no special characters in slugs
Date: Thu, 27 Jan 2022 21:32:21 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository taler-merchant-demos.

The following commit(s) were added to refs/heads/master by this push:
     new 9549f83  no special characters in slugs
9549f83 is described below

commit 9549f8357d58288c923cf3aa51ca5ba08f601c04
Author: Florian Dold <florian@dold.me>
AuthorDate: Thu Jan 27 21:32:15 2022 +0100

    no special characters in slugs
---
 talermerchantdemos/blog/content.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/talermerchantdemos/blog/content.py 
b/talermerchantdemos/blog/content.py
index 658f017..2f7d973 100644
--- a/talermerchantdemos/blog/content.py
+++ b/talermerchantdemos/blog/content.py
@@ -100,7 +100,7 @@ def add_from_html(resource_name, lang):
     else:
         title = title_el.get_text().strip()
     slug = title.replace(" ", "_")
-    # slug = quote(title.replace(" ", "_"), safe="")
+    slug = re.sub(r'[^a-zA-Z0-9_]*', "-", slug)
 
     teaser = soup.find("p", attrs={"id": ["teaser"]})
     if teaser is None:

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]