diff --git a/pkg/modules/background/unsplash/unsplash.go b/pkg/modules/background/unsplash/unsplash.go index e6c45c05054..73e9d54640e 100644 --- a/pkg/modules/background/unsplash/unsplash.go +++ b/pkg/modules/background/unsplash/unsplash.go @@ -26,6 +26,7 @@ import ( "code.vikunja.io/web" "encoding/json" "net/http" + "net/url" "strconv" "strings" "time" @@ -196,7 +197,7 @@ func (p *Provider) Search(search string, page int64) (result []*background.Image } searchResult := &SearchResult{} - err = doGet("search/photos?query="+search+"&page="+strconv.FormatInt(page, 10)+"&per_page=25", &searchResult) + err = doGet("search/photos?query="+url.QueryEscape(search)+"&page="+strconv.FormatInt(page, 10)+"&per_page=25", &searchResult) if err != nil { return }