diff --git a/server/aap/publish/formatters/aap_newscentre_formatter.py b/server/aap/publish/formatters/aap_newscentre_formatter.py index 0e3affc3c..83dfeb387 100644 --- a/server/aap/publish/formatters/aap_newscentre_formatter.py +++ b/server/aap/publish/formatters/aap_newscentre_formatter.py @@ -81,7 +81,7 @@ def format_text_content(self, tag): else: child_tag.replace_with(' {}'.format(child_tag.get_text())) - para_text = re.sub(' +', ' ', tag.get_text().strip().replace('\xA0', ' ')) + para_text = re.sub(' +', ' ', tag.get_text().strip().replace('\n\n', ' ').replace('\xA0', ' ')) if para_text != '': tag.replace_with(' {}\r\n\r\n'.format(para_text)) else: diff --git a/server/aap/publish/formatters/anpa_formatter.py b/server/aap/publish/formatters/anpa_formatter.py index cb10e6ed8..b45b4dc3e 100644 --- a/server/aap/publish/formatters/anpa_formatter.py +++ b/server/aap/publish/formatters/anpa_formatter.py @@ -162,7 +162,7 @@ def format_text_content(self, tag): else: child_tag.replace_with(' {}'.format(child_tag.get_text())) - para_text = re.sub(' +', ' ', tag.get_text().strip().replace('\xA0', ' ')) + para_text = re.sub(' +', ' ', tag.get_text().strip().replace('\n\n', ' ').replace('\xA0', ' ')) if para_text != '': tag.replace_with(' {}\r\n'.format(para_text)) else: