Skip to content

Conversation

@dharesign
Copy link
Contributor

escape escapes certain characters, but those don't include +, so clicking a C++ language link will result in the +s not being escaped in the URL. This causes the search to search for "C " which finds no results.

encodeURIComponent is what should be used.

`escape` escapes certain characters, but those don't include `+`, so clicking a `C++` language link will result in the `+`s not being escaped in the URL.  This causes the search to search for `"C  "` which finds no results.

`encodeURIComponent` is what should be used.
Copy link
Member

@keegancsmith keegancsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, nice find.

@keegancsmith keegancsmith merged commit c747a3b into sourcegraph:main Jan 14, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants