commit f8b8432595fa70baa0b10868aa1bb0404e932e78
parent 0fe53220411afb74a0ee2af955f005cb44268b8b
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date: Fri, 8 Jan 2021 14:03:26 +0100
Fix HTML escaping for web feeds
Now it also escapes '&' -> '&'.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gensite.py b/gensite.py
@@ -291,7 +291,7 @@ def make_feed(posts, dst, list_layout, item_layout, **params):
if (i == max):
break
item_params = dict(params, **post)
- item_params['c_escaped'] = post['content'].replace('>', '>').replace('<', '<')
+ item_params['c_escaped'] = post['content'].replace('&', '&').replace('>', '>').replace('<', '<')
item = render(item_layout, **item_params)
items.append(item)