fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

fix: Escape language queries correctly (#1003)

`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.

+1 -1
+1 -1
web/templates.go
··· 213 213 <title>Results for {{.QueryStr}}</title> 214 214 <script> 215 215 function zoektAddQ(atom) { 216 - window.location.href = "/search?q=" + escape("{{.QueryStr}}" + " " + atom) + 216 + window.location.href = "/search?q=" + encodeURIComponent("{{.QueryStr}}" + " " + atom) + 217 217 "&" + "num=" + {{.Last.Num}}; 218 218 } 219 219 </script>