use pathEscape / pathUnescape for query/rx URLs (fixes + in regex)
This commit is contained in:
parent
e0ff64cd22
commit
7b9aece4d2
@ -121,7 +121,7 @@ func (this *ArchiveServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
} else if matches := this.rxSearch.FindStringSubmatch(r.URL.Path); len(matches) > 0 {
|
} else if matches := this.rxSearch.FindStringSubmatch(r.URL.Path); len(matches) > 0 {
|
||||||
if ls := this.lookupSource(matches[1]); ls != nil {
|
if ls := this.lookupSource(matches[1]); ls != nil {
|
||||||
arc.selectSource(ls, matches[1])
|
arc.selectSource(ls, matches[1])
|
||||||
arc.query, _ = url.QueryUnescape(matches[2])
|
arc.query, _ = url.PathUnescape(matches[2])
|
||||||
arc.queryIsRegex = false
|
arc.queryIsRegex = false
|
||||||
arc.renderSearch(w)
|
arc.renderSearch(w)
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ func (this *ArchiveServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
} else if matches := this.rxSearchRx.FindStringSubmatch(r.URL.Path); len(matches) > 0 {
|
} else if matches := this.rxSearchRx.FindStringSubmatch(r.URL.Path); len(matches) > 0 {
|
||||||
if ls := this.lookupSource(matches[1]); ls != nil {
|
if ls := this.lookupSource(matches[1]); ls != nil {
|
||||||
arc.selectSource(ls, matches[1])
|
arc.selectSource(ls, matches[1])
|
||||||
arc.query, _ = url.QueryUnescape(matches[2])
|
arc.query, _ = url.PathUnescape(matches[2])
|
||||||
arc.queryIsRegex = true
|
arc.queryIsRegex = true
|
||||||
arc.renderSearch(w)
|
arc.renderSearch(w)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user