From c2832c0e5e73fc54a987232c1686cc8abbef57d4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 10 Oct 2020 10:36:23 +0100 Subject: [PATCH] Replace dashes --- newsdaemon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/newsdaemon.py b/newsdaemon.py index 00bd814fe..8cb2d697a 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -9,7 +9,6 @@ __status__ = "Production" import os import time import datetime -import unicodedata from collections import OrderedDict from newswire import getDictFromNewswire from posts import createNewsPost @@ -51,8 +50,9 @@ def saveArrivedTime(baseDir: str, postFilename: str, arrived: str) -> None: arrivedFile.close() -def removeControlCharacters(content: str): - return "".join(ch for ch in content if unicodedata.category(ch)[0]!="C") +def removeControlCharacters(content: str) -> str: + return content.replace('&8211;', '-') + def convertRSStoActivityPub(baseDir: str, httpPrefix: str, domain: str, port: int,