mirror of
https://github.com/golang/go
synced 2024-11-18 09:04:49 -07:00
godoc: don't quote search term to avoid escaping regexps
This is safe because the page title is HTML-escaped as it is displayed. Fixes golang/go#14208 Change-Id: Ib98071a08adeaad79043b9a2eb07bc7a5e8d251d Reviewed-on: https://go-review.googlesource.com/19242 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
02f1928320
commit
fe74a41861
@ -110,7 +110,7 @@ func (p *Presentation) HandleSearch(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var title string
|
||||
if haveResults := contents.Len() > 0; haveResults {
|
||||
title = fmt.Sprintf(`Results for query %q`, query)
|
||||
title = fmt.Sprintf(`Results for query: %v`, query)
|
||||
if !p.Corpus.IndexEnabled {
|
||||
result.Alert = ""
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user