mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
8299b77942
commit
5c5b715bbe
9
posts.py
9
posts.py
|
@ -3944,14 +3944,19 @@ def downloadAnnounce(session, baseDir: str, httpPrefix: str,
|
||||||
if dangerousMarkup(contentStr, allowLocalNetworkAccess):
|
if dangerousMarkup(contentStr, allowLocalNetworkAccess):
|
||||||
_rejectAnnounce(announceFilename)
|
_rejectAnnounce(announceFilename)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if isFiltered(baseDir, nickname, domain, contentStr):
|
if isFiltered(baseDir, nickname, domain, contentStr):
|
||||||
_rejectAnnounce(announceFilename)
|
_rejectAnnounce(announceFilename)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# remove any long words
|
# remove any long words
|
||||||
announcedJson['content'] = removeLongWords(contentStr, 40, [])
|
contentStr = removeLongWords(contentStr, 40, [])
|
||||||
|
|
||||||
# remove text formatting, such as bold/italics
|
# remove text formatting, such as bold/italics
|
||||||
announcedJson['content'] = removeTextFormatting(contentStr)
|
contentStr = removeTextFormatting(contentStr)
|
||||||
|
|
||||||
|
# set the content after santitization
|
||||||
|
announcedJson['content'] = contentStr
|
||||||
|
|
||||||
# wrap in create to be consistent with other posts
|
# wrap in create to be consistent with other posts
|
||||||
announcedJson = \
|
announcedJson = \
|
||||||
|
|
Loading…
Reference in New Issue