mirror of
https://github.com/iib0011/omni-tools.git
synced 2026-12-03 01:59:28 +03:00
CSV cell values containing &, <, >, ", ' were inserted directly into XML element content without escaping, producing malformed XML output. This adds an escapeXml() function that converts these characters to their corresponding XML entities (&, <, >, ", '). Also adds sanitizeXmlElementName() to convert CSV headers into valid XML element names by replacing invalid characters with underscores. Adds unit tests covering all five XML special characters, sanitized headers, empty values, and normal data. Fixes #405