You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Because leptos_router uses js_sys::encode_uri instead of js_sys::encode_uri_component under the hood, it does not escape characters like % and +. In #2601 I fixed the issue. Please note that the fix also revealed an issue with double decoding values, which causes errors with %/%25 in the URL, which I also fixed in the same PR.
Leptos Dependencies
leptos = { version = "0.6.11", features = ["nightly"] }
leptos_meta = { version = "0.6.11", features = ["nightly"] }
leptos_actix = { version = "0.6.11", optional = true }
leptos_router = { version = "0.6.11", features = ["nightly"] }
leptos_dom = "0.6.11"
leptos_reactive = { version = "0.6.11" }
leptos_macro = { version = "0.6.11" }
To Reproduce
Run the following code, then try to enter + into input.
Describe the bug
Because leptos_router uses
js_sys::encode_uri
instead ofjs_sys::encode_uri_component
under the hood, it does not escape characters like%
and+
. In #2601 I fixed the issue. Please note that the fix also revealed an issue with double decoding values, which causes errors with%
/%25
in the URL, which I also fixed in the same PR.Leptos Dependencies
leptos = { version = "0.6.11", features = ["nightly"] }
leptos_meta = { version = "0.6.11", features = ["nightly"] }
leptos_actix = { version = "0.6.11", optional = true }
leptos_router = { version = "0.6.11", features = ["nightly"] }
leptos_dom = "0.6.11"
leptos_reactive = { version = "0.6.11" }
leptos_macro = { version = "0.6.11" }
To Reproduce
Run the following code, then try to enter
+
into input.Expected behavior
Characters like
+
show up in the input because they were properly escaped into the query parametersActual behavior
Instead of a
+
, we get a space characterThe text was updated successfully, but these errors were encountered: