diff --git a/resources/lib/helper/utils.py b/resources/lib/helper/utils.py index 95c99c7c..19411b1b 100644 --- a/resources/lib/helper/utils.py +++ b/resources/lib/helper/utils.py @@ -293,7 +293,11 @@ def indent(elem, level=0): def write_xml(content, file): with open(file, 'w') as infile: - content = content.replace("'", '"') + def replace_apostrophes(match): + return match.group(0).replace("'", '"') + + content = re.sub("<(.*?)>", replace_apostrophes, content) + content = content.replace('?>', ' standalone="yes" ?>', 1) infile.write(content)