Fix #59 (& issue)
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

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 /// Escape &str for xml inclusion
pub fn xml_escape(s: &str) -> String { pub fn xml_escape(s: &str) -> String {
s.replace("<", "&lt;") s.replace("&", "&amp;")
.replace("<", "&lt;")
.replace(">", "&gt;") .replace(">", "&gt;")
.replace("\"", "&quot;") .replace("\"", "&quot;")
} }