mirror of https://gitlab.com/bashrc2/epicyon
Don't remove html, but check for dangerous markup
parent
2bb116ceed
commit
51ff0fb438
|
@ -9,7 +9,7 @@ __status__ = "Production"
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
from utils import removeHtml
|
from utils import dangerousMarkup
|
||||||
from utils import getConfigParam
|
from utils import getConfigParam
|
||||||
from utils import getFullDomain
|
from utils import getFullDomain
|
||||||
from utils import isEditor
|
from utils import isEditor
|
||||||
|
@ -72,9 +72,11 @@ def _getHelpForTimeline(baseDir: str, boxName: str) -> str:
|
||||||
instanceTitle = 'Epicyon'
|
instanceTitle = 'Epicyon'
|
||||||
with open(helpFilename, 'r') as helpFile:
|
with open(helpFilename, 'r') as helpFile:
|
||||||
helpText = helpFile.read()
|
helpText = helpFile.read()
|
||||||
|
if dangerousMarkup(helpText, False):
|
||||||
|
return ''
|
||||||
helpText = helpText.replace('INSTANCE', instanceTitle)
|
helpText = helpText.replace('INSTANCE', instanceTitle)
|
||||||
return '<div class="container">\n' + \
|
return '<div class="container">\n' + \
|
||||||
markdownToHtml(removeHtml(helpText)) + '\n' + \
|
markdownToHtml(helpText) + '\n' + \
|
||||||
'</div>\n'
|
'</div>\n'
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue