summaryrefslogtreecommitdiff
path: root/talermerchantdemos/blog/content.py
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-05-10 16:40:55 +0200
committerFlorian Dold <florian@dold.me>2021-05-10 16:40:55 +0200
commite80ad56b6a89a9b4be4c42f27902a71f797dd60a (patch)
treecb4b5e0c1fe3d25111ae59b4ce9ffc030a18323e /talermerchantdemos/blog/content.py
parent158932b1cb7772782cb1211a2143dcb39b3dfe0b (diff)
downloadtaler-merchant-demos-e80ad56b6a89a9b4be4c42f27902a71f797dd60a.tar.gz
taler-merchant-demos-e80ad56b6a89a9b4be4c42f27902a71f797dd60a.tar.bz2
taler-merchant-demos-e80ad56b6a89a9b4be4c42f27902a71f797dd60a.zip
always quote the slug / article name
Diffstat (limited to 'talermerchantdemos/blog/content.py')
-rw-r--r--talermerchantdemos/blog/content.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/talermerchantdemos/blog/content.py b/talermerchantdemos/blog/content.py
index ba2fcbe..4a6282e 100644
--- a/talermerchantdemos/blog/content.py
+++ b/talermerchantdemos/blog/content.py
@@ -24,6 +24,7 @@ from bs4 import BeautifulSoup
from pkg_resources import resource_stream, resource_filename
from os import listdir
from os.path import isfile, join
+from urllib.parse import quote
LOGGER = logging.getLogger(__name__)
@@ -98,7 +99,7 @@ def add_from_html(resource_name, lang):
title = resource_name
else:
title = title_el.get_text().strip()
- slug = title.replace(" ", "_")
+ slug = quote(title.replace(" ", "_"))
teaser = soup.find("p", attrs={"id": ["teaser"]})
if teaser is None: