Index: cms/converters.py |
diff --git a/cms/converters.py b/cms/converters.py |
index 3e57e8a8bf9af552ffb64da3c51e65dce1ba5249..d923abca5dd5f82bc6326e462785181cf538a44e 100644 |
--- a/cms/converters.py |
+++ b/cms/converters.py |
@@ -166,7 +166,12 @@ class Converter: |
attrs = map(stringify_attribute, attrs) |
result = re.sub( |
r"%s([^<>]*?)%s" % (re_escape("<%s>" % tag), re_escape("</%s>" % tag)), |
- r'<%s%s>\1</%s>' % (tag, " " + " ".join(attrs) if attrs else "", tag), |
+ lambda match: r'<%s%s>%s</%s>' % ( |
Sebastian Noack
2015/05/07 11:24:12
I suppose we use a callback now, to prevent backsl
kzar
2015/05/07 11:25:16
Yep, you got it
|
+ tag, |
+ " " + " ".join(attrs) if attrs else "", |
+ match.group(1), |
+ tag |
+ ), |
result, 1, flags=re.S |
) |
result = re.sub( |