aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-04-27 23:10:43 +0200
committerAlex Auvolat <alex@adnab.me>2021-04-27 23:10:43 +0200
commit642186c53051b9edf8a23073a7fd17d7d7e2b819 (patch)
tree0fa02a60730f479cbaa87fbd5065d332546449e4
parente01f74e763c16c0ad3da52f7f5649014f6f58361 (diff)
downloadgarage-642186c53051b9edf8a23073a7fd17d7d7e2b819.tar.gz
garage-642186c53051b9edf8a23073a7fd17d7d7e2b819.zip
Fix #59 (& issue)
-rw-r--r--src/api/encoding.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/encoding.rs b/src/api/encoding.rs
index 63c5dee2..b3fbbe34 100644
--- a/src/api/encoding.rs
+++ b/src/api/encoding.rs
@@ -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;")
}