Compare commits

...

2 Commits
4475 ... 3606

Author SHA1 Message Date
Greg Johnston
a1bc89576e clippy 2025-02-17 07:39:54 -05:00
Greg Johnston
5aa160dabf fix: allow decoding already-decoded URI components (closes #3606) 2025-02-16 17:08:45 -05:00

View File

@@ -123,14 +123,20 @@ impl Url {
#[cfg(not(feature = "ssr"))]
{
js_sys::decode_uri_component(s).unwrap().into()
match js_sys::decode_uri_component(s) {
Ok(v) => v.into(),
Err(_) => s.into(),
}
}
}
pub fn unescape_minimal(s: &str) -> String {
#[cfg(not(feature = "ssr"))]
{
js_sys::decode_uri(s).unwrap().into()
match js_sys::decode_uri(s) {
Ok(v) => v.into(),
Err(_) => s.into(),
}
}
#[cfg(feature = "ssr")]