diff --git a/app/lib/babycode.py b/app/lib/babycode.py index de825e5..0e59a4c 100644 --- a/app/lib/babycode.py +++ b/app/lib/babycode.py @@ -1,5 +1,5 @@ from .babycode_parser import Parser -from markupsafe import escape +from markupsafe import Markup, escape import re BABYCODE_VERSION = 3 @@ -241,7 +241,7 @@ def babycode_to_html(s): element['children'][i + 1] if i+1 < len(element['children']) else None ) _nobr = element['name'] == "code" or element['name'] == "ul" or element['name'] == "ol" - c = c + fold(child, _nobr, _surrounding) + c = c + Markup(fold(child, _nobr, _surrounding)) res = TAGS[element['name']](c, element['attr'], surrounding) return res case "link":