Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Commit

Permalink
api/v2: enable escaping of search string
Browse files Browse the repository at this point in the history
  • Loading branch information
postables committed Mar 3, 2020
1 parent 683317e commit 83eee21
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/v2/routes_database.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package v2

import (
"html"
"net/http"

"github.com/RTradeLtd/Temporal/eh"
Expand All @@ -20,6 +21,8 @@ func (api *API) searchUploadsForUser(c *gin.Context) {
FailWithMissingField(c, missingField)
return
}
// escape string
forms["search_query"] = html.UnescapeString(forms["search_query"])
if c.Query("paged") == "true" {
api.pageIt(
c,
Expand Down

0 comments on commit 83eee21

Please sign in to comment.