pub fn xml_escape(s: &str) -> StringExpand description
Escape a string for safe inclusion in XML content.
Replaces &, <, >, ", and ' with their XML entity references.
ยงExamples
use rustack_s3_core::utils::xml_escape;
assert_eq!(xml_escape("a<b>c"), "a<b>c");
assert_eq!(xml_escape("x&y"), "x&y");
assert_eq!(xml_escape("hello"), "hello");