-
Notifications
You must be signed in to change notification settings - Fork 14k
Description
+ in a URL means space, just like %20. When I paste something with a space in my browser search box (like, e.g., a trailing space; not the omnibar; in Firefox), and search on doc.rust-lang.org, test+ can be seen in the search box on the page, along with the error 'Query parser error: "Unexpected +".' The address bar shows https://doc.rust-lang.org/std/?search=test%2B (literal + is U+002B).
When I manually visit https://doc.rust-lang.org/std/?search=test+, a redirect to https://doc.rust-lang.org/std/?search=test%2B can briefly be seen happening in the address bar (same in Brave browser), whereas manually visiting https://www.google.com/search?q=foo+bar+ works as expected.
The same problem happens on other pages using rustdoc, like https://microsoft.github.io/windows-docs-rs/doc/windows/.
+ should be treated as space - as usual - but it seems something related to rustdoc is erroneously treating it as a literal +.