diff options
author | Alex <alex@adnab.me> | 2021-04-27 23:15:01 +0200 |
---|---|---|
committer | Alex <alex@adnab.me> | 2021-04-27 23:15:01 +0200 |
commit | 368eb354846790e9fc616d9a26ddc414748d847f (patch) | |
tree | 0fa02a60730f479cbaa87fbd5065d332546449e4 /src | |
parent | 119217f9f6f904efda33d80f744404c6935ed827 (diff) | |
parent | 642186c53051b9edf8a23073a7fd17d7d7e2b819 (diff) | |
download | garage-368eb354846790e9fc616d9a26ddc414748d847f.tar.gz garage-368eb354846790e9fc616d9a26ddc414748d847f.zip |
Merge pull request 'Correctly encode ampersand' (#61) from bug/ampersand into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/61
Diffstat (limited to 'src')
-rw-r--r-- | src/api/encoding.rs | 3 |
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("<", "<") + s.replace("&", "&") + .replace("<", "<") .replace(">", ">") .replace("\"", """) } |