main
Bob Mottram 2020-10-11 12:00:28 +01:00
parent 78286119ea
commit f721f7a1b9
1 changed files with 4 additions and 6 deletions

View File

@ -110,16 +110,14 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
newswire[originalDateStr][3] = filename newswire[originalDateStr][3] = filename
continue continue
# rssTitle = removeControlCharacters(item[0]) rssTitle = removeControlCharacters(item[0])
rssTitle = item[0]
url = item[1] url = item[1]
if dangerousMarkup(url) or dangerousMarkup(rssTitle): if dangerousMarkup(url) or dangerousMarkup(rssTitle):
continue continue
rssDescription = '' rssDescription = ''
# get the rss description if it exists # get the rss description if it exists
# rssDescription = removeControlCharacters(item[4]) rssDescription = removeControlCharacters(item[4])
rssDescription = item[4]
if rssDescription.startswith('<![CDATA['): if rssDescription.startswith('<![CDATA['):
rssDescription = rssDescription.replace('<![CDATA[', '') rssDescription = rssDescription.replace('<![CDATA[', '')
rssDescription = rssDescription.replace(']]>', '') rssDescription = rssDescription.replace(']]>', '')
@ -147,10 +145,10 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
# published time), so we change that later # published time), so we change that later
blog = createNewsPost(baseDir, blog = createNewsPost(baseDir,
domain, port, httpPrefix, domain, port, httpPrefix,
urllib.parse.quote(rssDescription), rssDescription,
followersOnly, False, followersOnly, False,
None, None, None, useBlurhash, None, None, None, useBlurhash,
urllib.parse.quote(rssTitle)) rssTitle)
if not blog: if not blog:
continue continue