add service file content to xml as cdata to avoid escaping
This commit is contained in:
parent
ca292cb11e
commit
78d442b574
1 changed files with 1 additions and 3 deletions
|
@ -163,14 +163,12 @@ class ServiceElement:
|
||||||
self.element.append(directories)
|
self.element.append(directories)
|
||||||
|
|
||||||
def add_files(self) -> None:
|
def add_files(self) -> None:
|
||||||
# get custom files
|
|
||||||
file_elements = etree.Element("files")
|
file_elements = etree.Element("files")
|
||||||
for file_name in self.service.config_data:
|
for file_name in self.service.config_data:
|
||||||
data = self.service.config_data[file_name]
|
data = self.service.config_data[file_name]
|
||||||
file_element = etree.SubElement(file_elements, "file")
|
file_element = etree.SubElement(file_elements, "file")
|
||||||
add_attribute(file_element, "name", file_name)
|
add_attribute(file_element, "name", file_name)
|
||||||
file_element.text = data
|
file_element.text = etree.CDATA(data)
|
||||||
|
|
||||||
if file_elements.getchildren():
|
if file_elements.getchildren():
|
||||||
self.element.append(file_elements)
|
self.element.append(file_elements)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue