Get first paragraph for feed description

main
Bob Mottram 2020-11-08 12:40:40 +00:00
parent 9d89bb5f94
commit 4dc132c7bc
1 changed files with 4 additions and 2 deletions

View File

@ -25,6 +25,7 @@ from ssb import getSSBAddress
from tox import getToxAddress from tox import getToxAddress
from matrix import getMatrixAddress from matrix import getMatrixAddress
from donate import getDonationUrl from donate import getDonationUrl
from utils import firstParagraphFromString
from utils import getCSS from utils import getCSS
from utils import isSystemAccount from utils import isSystemAccount
from utils import removeIdEnding from utils import removeIdEnding
@ -969,10 +970,11 @@ def rssHashtagSearch(nickname: str, domain: str, port: int,
' <title>' + \ ' <title>' + \
postJsonObject['object']['summary'] + \ postJsonObject['object']['summary'] + \
'</title>' '</title>'
description = postJsonObject['object']['content']
description = firstParagraphFromString(description)
hashtagFeed += \ hashtagFeed += \
' <description><![CDATA[' + \ ' <description><![CDATA[' + \
postJsonObject['object']['content'] + \ description + ']]></description>'
']]></description>'
hashtagFeed += \ hashtagFeed += \
' <pubDate>' + rssDateStr + '</pubDate>' ' <pubDate>' + rssDateStr + '</pubDate>'
if postJsonObject['object'].get('attachment'): if postJsonObject['object'].get('attachment'):