From f93d5d2acd53365f70e48a0002e91e94be37f733 Mon Sep 17 00:00:00 2001 From: Tom Greig Date: Fri, 28 Mar 2025 20:26:19 +0000 Subject: [PATCH] Handle nested CDATA from nested templates When putting CDATA into the output, any instances of ']]>' in the text are replaced with ']]]]>'. This allows nested templates, e.g. from list views inside list views to work properly. --- blueprintcompiler/outputs/xml/xml_emitter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/blueprintcompiler/outputs/xml/xml_emitter.py b/blueprintcompiler/outputs/xml/xml_emitter.py index ea91e03..d34eff4 100644 --- a/blueprintcompiler/outputs/xml/xml_emitter.py +++ b/blueprintcompiler/outputs/xml/xml_emitter.py @@ -73,6 +73,7 @@ class XmlEmitter: self._needs_newline = False def put_cdata(self, text: str): + text = text.replace("]]>", "]]]]>") self.result += f"" self._needs_newline = False