From 989ff6d36771e4441ffed2c2883ae694af20b0b6 Mon Sep 17 00:00:00 2001 From: Filip Gurbal Date: Mon, 4 Nov 2019 14:04:50 +0100 Subject: [PATCH] Added comment for replace_apostrophes function in write_xml --- resources/lib/helper/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/helper/utils.py b/resources/lib/helper/utils.py index 19411b1b..058349c1 100644 --- a/resources/lib/helper/utils.py +++ b/resources/lib/helper/utils.py @@ -293,9 +293,9 @@ def indent(elem, level=0): def write_xml(content, file): with open(file, 'w') as infile: + # replace apostrophes with double quotes only in xml keys, not texts def replace_apostrophes(match): return match.group(0).replace("'", '"') - content = re.sub("<(.*?)>", replace_apostrophes, content) content = content.replace('?>', ' standalone="yes" ?>', 1)