From 4f740a836ceaa167e78548374bed2222be0ef6c7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 3 Dec 2020 10:12:09 +0000 Subject: [PATCH] Check for dubious payloads --- newswire.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/newswire.py b/newswire.py index 606bf1dd..295579de 100644 --- a/newswire.py +++ b/newswire.py @@ -227,10 +227,14 @@ def xml2StrToHashtagCategories(baseDir: str, domain: str, xmlStr: str, categoryStr = categoryStr.split('')[0].strip() if not categoryStr: continue + if 'CDATA' in categoryStr: + continue hashtagListStr = rssItem.split('')[1] hashtagListStr = hashtagListStr.split('')[0].strip() if not hashtagListStr: continue + if 'CDATA' in hashtagListStr: + continue hashtagList = hashtagListStr.split(' ') if not isBlockedHashtag(baseDir, categoryStr): for hashtag in hashtagList: