Fix #59 (& issue)

This commit is contained in:
Alex 2021-04-27 23:10:43 +02:00
parent e01f74e763
commit 642186c530
No known key found for this signature in database
GPG key ID: EDABF9711E244EB1

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;")
}