More html validity checks

main
Bob Mottram 2020-06-14 14:47:46 +01:00
parent 2d5f3276f6
commit 72fc823c51
1 changed files with 2 additions and 1 deletions

View File

@ -1600,7 +1600,8 @@ def validPostContent(baseDir: str, nickname: str, domain: str,
messageJson['object']['content']):
return True
# check for bad html
invalidStrings = ('<script>', '<canvas>', '<style>',
invalidStrings = ('<script>', '</script>', '</canvas>',
'</style>', '</abbr>',
'</html>', '</body>', '<br>', '<hr>')
for badStr in invalidStrings:
if badStr in messageJson['object']['content']: