forked from indymedia/epicyon
Remove CDATA
parent
fc1bc510a6
commit
a36132bfb7
|
@ -99,11 +99,14 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
|
||||||
|
|
||||||
# get the rss description if it exists
|
# get the rss description if it exists
|
||||||
rssDescription = removeControlCharacters(item[4])
|
rssDescription = removeControlCharacters(item[4])
|
||||||
|
if rssDescription.startswith('<![CDATA['):
|
||||||
|
rssDescription = rssDescription.replace('<![CDATA[', '')
|
||||||
|
rssDescription = rssDescription.replace(']]>', '')
|
||||||
|
|
||||||
# add the off-site link to the description
|
# add the off-site link to the description
|
||||||
if rssDescription:
|
if rssDescription:
|
||||||
rssDescription += \
|
rssDescription += \
|
||||||
'\n\n<a href="' + url + '">' + \
|
'<br><br><a href="' + url + '">' + \
|
||||||
translate['Read more...'] + '</a>'
|
translate['Read more...'] + '</a>'
|
||||||
else:
|
else:
|
||||||
rssDescription = \
|
rssDescription = \
|
||||||
|
@ -142,6 +145,7 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
|
||||||
blog['object']['url'] = \
|
blog['object']['url'] = \
|
||||||
httpPrefix + '://' + domain + '/@news/' + statusNumber
|
httpPrefix + '://' + domain + '/@news/' + statusNumber
|
||||||
blog['object']['published'] = dateStr
|
blog['object']['published'] = dateStr
|
||||||
|
blog['object']['content'] = rssDescription
|
||||||
|
|
||||||
postId = newPostId.replace('/', '#')
|
postId = newPostId.replace('/', '#')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue