aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2021-04-27 21:30:12 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2021-04-27 21:30:12 +0200
commitd6e0749e9a5a203332f45ffd8e3328d414ec454c (patch)
treefbad55d796654186115c676fae0fe24d4277d47e /src/api
parent119217f9f6f904efda33d80f744404c6935ed827 (diff)
downloadgarage-d6e0749e9a5a203332f45ffd8e3328d414ec454c.tar.gz
garage-d6e0749e9a5a203332f45ffd8e3328d414ec454c.zip
Correctly encode ampersand
Diffstat (limited to 'src/api')
-rw-r--r--src/api/encoding.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/api/encoding.rs b/src/api/encoding.rs
index 63c5dee2..934a827c 100644
--- a/src/api/encoding.rs
+++ b/src/api/encoding.rs
@@ -5,6 +5,7 @@ pub fn xml_escape(s: &str) -> String {
s.replace("<", "&lt;")
.replace(">", "&gt;")
.replace("\"", "&quot;")
+ .replace("&", "&amp;")
}
/// Encode &str for use in a URI