mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-03 15:49:07 -04:00
Handle nested CDATA from nested templates
When putting CDATA into the output, any instances of ']]>' in the text are replaced with ']]]]><![CDATA[>'. This allows nested templates, e.g. from list views inside list views to work properly.
This commit is contained in:
parent
394014429e
commit
f93d5d2acd
1 changed files with 1 additions and 0 deletions
|
@ -73,6 +73,7 @@ class XmlEmitter:
|
|||
self._needs_newline = False
|
||||
|
||||
def put_cdata(self, text: str):
|
||||
text = text.replace("]]>", "]]]]><![CDATA[>")
|
||||
self.result += f"<![CDATA[{text}]]>"
|
||||
self._needs_newline = False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue