From 61376c4bcb1907c0129b12c4e861b8f2e7fd51e6 Mon Sep 17 00:00:00 2001 From: Stef Date: Mon, 15 Aug 2022 10:33:06 +0200 Subject: [PATCH] Update regex for template functions to not break on different formatting --- uweb3/templateparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uweb3/templateparser.py b/uweb3/templateparser.py index cd27a73e..ad5876c1 100644 --- a/uweb3/templateparser.py +++ b/uweb3/templateparser.py @@ -447,7 +447,7 @@ def SetEvalWhitelist( class Template(list): """Contained for template parts, allowing for rich content construction.""" - FUNCTION = re.compile(r"\{\{\s*(.*?)\s*\}\}") + FUNCTION = re.compile(r"\{\{\s*([\s\S]*?)\s*\}\}") # For a full tag syntax explanation, refer to the TAG regex in TemplateTag. TAG = re.compile( """