From e176882cdd1018b73abf2011719353b70105c1e7 Mon Sep 17 00:00:00 2001 From: "Yang, Bo" Date: Sun, 18 May 2025 10:28:35 -0700 Subject: [PATCH] Add b'\\' and b']' to USERINFO encode set According to https://url.spec.whatwg.org/#userinfo-percent-encode-set, those characters are part of the encode set --- src/encode_sets.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/encode_sets.rs b/src/encode_sets.rs index 9be3957..5a5ab6f 100644 --- a/src/encode_sets.rs +++ b/src/encode_sets.rs @@ -14,6 +14,8 @@ pub(crate) const USERINFO: &AsciiSet = &PATH .add(b'=') .add(b'@') .add(b'[') + .add(b'\\') + .add(b']') .add(b'^') .add(b'|'); pub(crate) const COMPONENT: &AsciiSet = &USERINFO.add(b'$').add(b'&').add(b'+').add(b',');