mirror of https://gitlab.com/bashrc2/epicyon
Exclude code from markup, unless it is a git patch
parent
443c9599bf
commit
418897b7ce
1
inbox.py
1
inbox.py
|
@ -1870,6 +1870,7 @@ def _validPostContent(baseDir: str, nickname: str, domain: str,
|
|||
print('WARN: invalid content warning ' + summary)
|
||||
return False
|
||||
|
||||
# check for patches before dangeousMarkup, which excludes code
|
||||
if isGitPatch(baseDir, nickname, domain,
|
||||
messageJson['object']['type'],
|
||||
summary,
|
||||
|
|
2
utils.py
2
utils.py
|
@ -859,7 +859,7 @@ def dangerousMarkup(content: str, allowLocalNetworkAccess: bool) -> bool:
|
|||
"""
|
||||
separators = [['<', '>'], ['<', '>']]
|
||||
invalidStrings = [
|
||||
'script', 'noscript',
|
||||
'script', 'noscript', 'code',
|
||||
'canvas', 'style', 'abbr',
|
||||
'frame', 'iframe', 'html', 'body',
|
||||
'hr', 'allow-popups', 'allow-scripts'
|
||||
|
|
Loading…
Reference in New Issue