Remove html from loaded markdown

merge-requests/30/head
Bob Mottram 2021-02-25 19:15:04 +00:00
parent a7e0985ac8
commit 3c270c39a5
3 changed files with 6 additions and 3 deletions

View File

@ -9,6 +9,7 @@ __status__ = "Production"
import os import os
from shutil import copyfile from shutil import copyfile
from utils import getConfigParam from utils import getConfigParam
from utils import removeHtml
from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlHeaderWithExternalStyle
from webapp_utils import htmlFooter from webapp_utils import htmlFooter
from webapp_utils import markdownToHtml from webapp_utils import markdownToHtml
@ -60,7 +61,7 @@ def htmlWelcomeScreen(baseDir: str, nickname: str,
copyfile(defaultFilename, welcomeFilename) copyfile(defaultFilename, welcomeFilename)
if os.path.isfile(welcomeFilename): if os.path.isfile(welcomeFilename):
with open(welcomeFilename, 'r') as welcomeFile: with open(welcomeFilename, 'r') as welcomeFile:
welcomeText = markdownToHtml(welcomeFile.read()) welcomeText = markdownToHtml(removeHtml(welcomeFile.read()))
welcomeForm = '' welcomeForm = ''
cssFilename = baseDir + '/epicyon-welcome.css' cssFilename = baseDir + '/epicyon-welcome.css'

View File

@ -8,6 +8,7 @@ __status__ = "Production"
import os import os
from shutil import copyfile from shutil import copyfile
from utils import removeHtml
from utils import getConfigParam from utils import getConfigParam
from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlHeaderWithExternalStyle
from webapp_utils import htmlFooter from webapp_utils import htmlFooter
@ -35,7 +36,7 @@ def htmlWelcomeFinal(baseDir: str, nickname: str, domain: str,
copyfile(defaultFilename, finalFilename) copyfile(defaultFilename, finalFilename)
if os.path.isfile(finalFilename): if os.path.isfile(finalFilename):
with open(finalFilename, 'r') as finalFile: with open(finalFilename, 'r') as finalFile:
finalText = markdownToHtml(finalFile.read()) finalText = markdownToHtml(removeHtml(finalFile.read()))
finalForm = '' finalForm = ''
cssFilename = baseDir + '/epicyon-welcome.css' cssFilename = baseDir + '/epicyon-welcome.css'

View File

@ -8,6 +8,7 @@ __status__ = "Production"
import os import os
from shutil import copyfile from shutil import copyfile
from utils import removeHtml
from utils import loadJson from utils import loadJson
from utils import getConfigParam from utils import getConfigParam
from utils import getImageExtensions from utils import getImageExtensions
@ -38,7 +39,7 @@ def htmlWelcomeProfile(baseDir: str, nickname: str, domain: str,
copyfile(defaultFilename, profileFilename) copyfile(defaultFilename, profileFilename)
if os.path.isfile(profileFilename): if os.path.isfile(profileFilename):
with open(profileFilename, 'r') as profileFile: with open(profileFilename, 'r') as profileFile:
profileText = markdownToHtml(profileFile.read()) profileText = markdownToHtml(removeHtml(profileFile.read()))
profileForm = '' profileForm = ''
cssFilename = baseDir + '/epicyon-welcome.css' cssFilename = baseDir + '/epicyon-welcome.css'