Correctly encode ampersand #61

Merged
lx merged 2 commits from bug/ampersand into main 2021-04-27 21:15:04 +00:00
Showing only changes of commit 642186c530 - Show all commits

View file

@ -2,7 +2,8 @@
/// Escape &str for xml inclusion
pub fn xml_escape(s: &str) -> String {
s.replace("<", "&lt;")
s.replace("&", "&amp;")
.replace("<", "&lt;")
.replace(">", "&gt;")
.replace("\"", "&quot;")
}