diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c3f1ac..9285cdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.5.2 + +### Fixes +* urgent fix of html escaping + ## 1.5.1 ### Fixes diff --git a/constants.py b/constants.py index 14da8eb..7296c3f 100644 --- a/constants.py +++ b/constants.py @@ -5,6 +5,6 @@ blacklistFile = 'word_blacklist.txt' configFile = 'config.json' faviconDir = Path.cwd() / 'static' / 'icons' / 'favicon' appName = 'CatAsk' -version = '1.5.1' +version = '1.5.2' # id (identifier) is to be interpreted as described in https://semver.org/#spec-item-9 version_id = '-alpha' diff --git a/functions.py b/functions.py index 5aee040..477f949 100644 --- a/functions.py +++ b/functions.py @@ -152,14 +152,14 @@ def renderMarkdown(text): # sanity of whoever will use this software # (after all, not everyone knows markdown syntax) md = mistune.create_markdown( - escape=False, + escape=True, plugins=plugins, hard_wrap=True ) html = md(text) cleaner = Cleaner(tags=allowed_tags, attributes=allowed_attrs) clean_html = cleaner.clean(html) - return Markup(html) + return Markup(clean_html) def generateMetadata(question=None, answer=None): metadata = {