From 3c270c39a52f6b82fbbdfede5ef23a7638a2d175 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 25 Feb 2021 19:15:04 +0000 Subject: [PATCH] Remove html from loaded markdown --- webapp_welcome.py | 3 ++- webapp_welcome_final.py | 3 ++- webapp_welcome_profile.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/webapp_welcome.py b/webapp_welcome.py index e623b3242..d5530a681 100644 --- a/webapp_welcome.py +++ b/webapp_welcome.py @@ -9,6 +9,7 @@ __status__ = "Production" import os from shutil import copyfile from utils import getConfigParam +from utils import removeHtml from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter from webapp_utils import markdownToHtml @@ -60,7 +61,7 @@ def htmlWelcomeScreen(baseDir: str, nickname: str, copyfile(defaultFilename, welcomeFilename) if os.path.isfile(welcomeFilename): with open(welcomeFilename, 'r') as welcomeFile: - welcomeText = markdownToHtml(welcomeFile.read()) + welcomeText = markdownToHtml(removeHtml(welcomeFile.read())) welcomeForm = '' cssFilename = baseDir + '/epicyon-welcome.css' diff --git a/webapp_welcome_final.py b/webapp_welcome_final.py index 2e3f6f293..5b61bab51 100644 --- a/webapp_welcome_final.py +++ b/webapp_welcome_final.py @@ -8,6 +8,7 @@ __status__ = "Production" import os from shutil import copyfile +from utils import removeHtml from utils import getConfigParam from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter @@ -35,7 +36,7 @@ def htmlWelcomeFinal(baseDir: str, nickname: str, domain: str, copyfile(defaultFilename, finalFilename) if os.path.isfile(finalFilename): with open(finalFilename, 'r') as finalFile: - finalText = markdownToHtml(finalFile.read()) + finalText = markdownToHtml(removeHtml(finalFile.read())) finalForm = '' cssFilename = baseDir + '/epicyon-welcome.css' diff --git a/webapp_welcome_profile.py b/webapp_welcome_profile.py index b84b474db..5f1d4b9ca 100644 --- a/webapp_welcome_profile.py +++ b/webapp_welcome_profile.py @@ -8,6 +8,7 @@ __status__ = "Production" import os from shutil import copyfile +from utils import removeHtml from utils import loadJson from utils import getConfigParam from utils import getImageExtensions @@ -38,7 +39,7 @@ def htmlWelcomeProfile(baseDir: str, nickname: str, domain: str, copyfile(defaultFilename, profileFilename) if os.path.isfile(profileFilename): with open(profileFilename, 'r') as profileFile: - profileText = markdownToHtml(profileFile.read()) + profileText = markdownToHtml(removeHtml(profileFile.read())) profileForm = '' cssFilename = baseDir + '/epicyon-welcome.css'