From ade3c0560b98db68b0a4dadd96df445fa3b08014 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 31 Oct 2020 22:47:43 +0000 Subject: [PATCH] Remove long words from newswire titles This can cause column overflows --- newswire.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/newswire.py b/newswire.py index cc2eb538..462ea570 100644 --- a/newswire.py +++ b/newswire.py @@ -22,6 +22,7 @@ from utils import removeHtml from blocking import isBlockedDomain from blocking import isBlockedHashtag from filters import isFiltered +from content import removeLongWords def rss2Header(httpPrefix: str, @@ -89,6 +90,10 @@ def addNewswireDictEntry(baseDir: str, domain: str, tags=[], maxTags=32) -> None: """Update the newswire dictionary """ + # remove any long words from the title, which can + # cause column overflows + title = removeLongWords(title, 30, []) + allText = removeHtml(title + ' ' + description) # check that none of the text is filtered against