From 751be27b5248d5b6fbf1930b926edb768a1b34c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Sun, 17 Aug 2025 15:15:49 +0300 Subject: [PATCH] unescape children of babycode elements --- app/lib/babycode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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":