Test with quote

main
Bob Mottram 2020-10-11 11:57:18 +01:00
parent abcda1af1e
commit 78286119ea
1 changed files with 8 additions and 4 deletions

View File

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