Strip strings containing '--' before conversion to XML comments.

Otherwise, the script bombs out when it tries to write the illegal XML.

Change-Id: Iaf0e9f6c82a57886ff56cdd4d1fc1c402776b29b
This commit is contained in:
Ian Macdonald
2021-03-01 17:20:12 +01:00
committed by bigbiff
parent fba0cee8ed
commit e772c3d9ac

View File

@@ -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: