aboutsummaryrefslogtreecommitdiff
path: root/src/codec.rs
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2020-10-15 12:44:14 -0700
committerRichard Walters <rwalters@digitalstirling.com>2020-10-15 12:44:14 -0700
commit170b711d710a0572fbd396c29be6647a5dcf3836 (patch)
treea44d522584e303114d5d7ec140069b295f28e546 /src/codec.rs
parent96d8c0d50c3c583a0cfaab749bf73743de1afe9c (diff)
Version 1.0.1
* Fixed bug in percent encoding of characters \x0 through \xF where they were encoded as "%0" through "%F" rather than "%00" through "%0F".
Diffstat (limited to 'src/codec.rs')
-rw-r--r--src/codec.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codec.rs b/src/codec.rs
index 22d9000..05fcee8 100644
--- a/src/codec.rs
+++ b/src/codec.rs
@@ -47,7 +47,7 @@ pub fn encode_element(
.map(|ci| {
match char::try_from(*ci) {
Ok(c) if allowed_characters.contains(&c) => c.to_string(),
- _ => format!("%{:X}", ci),
+ _ => format!("%{:02X}", ci),
}
})
.collect()