Ignore non-ASCII chars in ascii_percent_encoding

This commit is contained in:
RumovZ 2022-12-09 11:47:59 +01:00
parent 55f27779cf
commit 0b206b8a81

View File

@ -82,7 +82,8 @@ impl AsciiSet {
} }
fn should_percent_encode(&self, byte: u8) -> bool { fn should_percent_encode(&self, byte: u8) -> bool {
!byte.is_ascii() || self.contains(byte) // MODIFIED
byte.is_ascii() && self.contains(byte)
} }
pub const fn add(&self, byte: u8) -> Self { pub const fn add(&self, byte: u8) -> Self {