Description
Bug report
OS information
Tested using:
- Windows Chrome 134.0.6998.89
- Android Chrome 134.0.6698.96
- Windows Firefox 136.0.1
- Android Firefox 136.0.2
Steps to reproduce
Enter URL in browser:
https://devdocs.io/#q=c++%20std::min
According to http://devdocs.io/help#search, that should do a search in the C++ doc for std::min
. Instead, it searches the C++ doc for std::min
, with two leading spaces, and shows poor quality search results. Manually removing those leading spaces in the search box causes good search results to come up again.
I've used this feature for keyword searches from my browsers' URL bar for a long time, except as https://devdocs.io/#q=cpp%20%s
(cpp
rather than c++
), but starting very recently, that no longer selects the doc I intended.
Possible fix
Trim leading spaces on C++ search terms from the URL!
Alternatively, it seems like it would be slightly cleaner if single-doc searches could be done with URLs like:
https://devdocs.io/cpp/#q=std::min
Activity
noirgif commentedon Mar 21, 2025
Currently
https://devdocs.io/#q=c+{Query}
is a workaround for me. It seems that each plus sign adds an extra space. I guess that's how query string parsing worksAMagill commentedon Mar 21, 2025
@noirgif Nice workaround, thank you!
alexchantastic commentedon Mar 23, 2025
I think this is generally happening across all docs when encoding spaces as
%20
. Unfortunately, the workaround @noirgif proposed is not working for me.