xml.sax.saxutils.escape() escapes only the three characters &, <, and >. But LibreOffice also escapes the characters " and '. So we should escape them as well in order not to get large PR diffs each time a Python script is modifying the XML files. Or each time LibreOffice is modifying an XML file that was previously written by a Python script.
xml.sax.saxutils.escape()
escapes only the three characters&
,<
, and>
. But LibreOffice also escapes the characters"
and'
. So we should escape them as well in order not to get large PR diffs each time a Python script is modifying the XML files. Or each time LibreOffice is modifying an XML file that was previously written by a Python script.