urgent fix

This commit is contained in:
mst 2024-09-28 12:17:00 +03:00
parent afbd552d03
commit 432d44fc41
3 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
## 1.5.2
### Fixes
* urgent fix of html escaping
## 1.5.1
### Fixes

View file

@ -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'

View file

@ -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 = {