Escape XML special characters while preserving valid pre-encoded entities. Used for both attribute values and text content.
Escape XML special characters while preserving valid pre-encoded entities. Used for both attribute values and text content.