Skip to content

Commit

Permalink
Escape pound sign in URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Apr 20, 2021
1 parent b39947d commit 6a5e0e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ func FetchResponse(httpClient *http.Client, rurl, args string) ResponseType {
log.Printf("http request, UrlQueueSize %v, UrlQueueLimit %v\n", UrlQueueSize, UrlQueueLimit)
}
var response ResponseType
if strings.Contains(rurl, "#") {
rurl = strings.Replace(rurl, "#", "%23", -1)
}
response.Url = rurl
if validateUrl(rurl) == false {
response.Error = errors.New("Invalid URL")
Expand Down

0 comments on commit 6a5e0e3

Please sign in to comment.