From e772c3d9ace33dfdffafb5656f8763d966879e98 Mon Sep 17 00:00:00 2001 From: Ian Macdonald Date: Mon, 1 Mar 2021 17:20:12 +0100 Subject: [PATCH] Strip strings containing '--' before conversion to XML comments. Otherwise, the script bombs out when it tries to write the illegal XML. Change-Id: Iaf0e9f6c82a57886ff56cdd4d1fc1c402776b29b --- scripts/language_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/language_helper.py b/scripts/language_helper.py index 9fa956b2..67bd2012 100644 --- a/scripts/language_helper.py +++ b/scripts/language_helper.py @@ -129,7 +129,7 @@ for resnode in enres: break if found == False: print "'%s' present in English and not in %s" % (child.attributes['name'].value.encode("utf-8"), otherlang) - notfound_err = "NOT FOUND " + child.toxml() + notfound_err = "NOT FOUND " + child.toxml().replace('--', '\-\-') notfound_comment = doc.createComment(notfound_err) resources.appendChild(notfound_comment) elif child.nodeType == child.COMMENT_NODE: