HomeClusterLabs Projects

Refactor: libcrmcommon: Don't escape when creating XML

Description

Refactor: libcrmcommon: Don't escape when creating XML

Special characters don't need to be escaped in the libxml2 tree
representation. They only need to be escaped when we serialize them to
text. The XML that we output may be parsed again, and special characters
must be escaped in order for a conformant parser to succeed.

pcmk__xe_set_content() was the only place where we escaped special
characters when creating XML. Elsewhere we either used libxml2 functions
to parse XML from a file or string, or set attribute values without
escaping them.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Mar 23 2024, 4:30 AM
Parents
rPa966aeea6093: Merge pull request #3386 from nrwahl2/nrwahl2-xml_attrs2
Branches
Unknown
Tags
Unknown