From 8f1c8ad742cd14a9ca4db288b6cabcd2a0a9ea93 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 12 Jul 2023 09:53:32 +0100 Subject: [PATCH] Remove any html from buy links --- webapp_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp_utils.py b/webapp_utils.py index b3ab1e755..42d204f29 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -2393,19 +2393,19 @@ def get_buy_links(post_json_object: str, translate: {}, buy_sites: {}) -> {}: if isinstance(item['rel'], str): if item['rel'] in ('payment', 'pay', 'donate', 'donation', 'buy', 'purchase'): - links[item_name] = item['href'] + links[item_name] = remove_html(item['href']) continue if buy_sites: # limited to an allowlist of buying sites for site, buy_domain in buy_sites.items(): if buy_domain in item['href']: - links[site.title()] = item['href'] + links[site.title()] = remove_html(item['href']) continue else: # The name only needs to indicate that this is a buy link for buy_str in buy_strings: if buy_str in item_name.lower(): - links[item_name] = item['href'] + links[item_name] = remove_html(item['href']) continue return links