From 74533468ead5f9b7522b40654e739b37bd122e68 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 28 Jun 2023 12:01:03 +0100 Subject: [PATCH] Unescape before removing html --- newswire.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/newswire.py b/newswire.py index f77cfa55d..3ccbeb554 100644 --- a/newswire.py +++ b/newswire.py @@ -778,8 +778,8 @@ def _xml2str_to_dict(base_dir: str, domain: str, xml_str: str, description = '' if '' in rss_item and '' in rss_item: description = rss_item.split('')[1] - description = remove_html(description.split('')[0]) - description = unescaped_text(description) + description = unescaped_text(description.split('')[0]) + description = remove_html(description) else: if '' in rss_item and \ '' in rss_item: @@ -888,8 +888,8 @@ def _xml1str_to_dict(base_dir: str, domain: str, xml_str: str, description = '' if '' in rss_item and '' in rss_item: description = rss_item.split('')[1] - description = remove_html(description.split('')[0]) - description = unescaped_text(description) + description = unescaped_text(description.split('')[0]) + description = remove_html(description) else: if '' in rss_item and \ '' in rss_item: @@ -986,13 +986,13 @@ def _atom_feed_to_dict(base_dir: str, domain: str, xml_str: str, description = '' if '' in atom_item and '' in atom_item: description = atom_item.split('')[1] - description = remove_html(description.split('')[0]) - description = unescaped_text(description) + description = unescaped_text(description.split('')[0]) + description = remove_html(description) elif '' in atom_item: description = atom_item.split('', 1)[1] - description = remove_html(description.split('')[0]) - description = unescaped_text(description) + description = unescaped_text(description.split('')[0]) + description = remove_html(description) else: if '' in atom_item and \ '' in atom_item: