aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--search_query.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/search_query.go b/search_query.go
index b332437..df72827 100644
--- a/search_query.go
+++ b/search_query.go
@@ -19,6 +19,7 @@ package meow
import (
"fmt"
+ "net/url"
"errors"
)
@@ -95,5 +96,5 @@ func (q SearchQuery) build() (string, error) {
return "", errors.New("max page number is 100")
}
- return fmt.Sprintf("%s?f=%d&c=%d_%d&q=%s&p=%d", q.BaseURL, q.Filter, q.Category.Category, q.Category.SubCategory, q.SearchString, q.Page), nil
+ return fmt.Sprintf("%s?f=%d&c=%d_%d&q=%s&p=%d", q.BaseURL, q.Filter, q.Category.Category, q.Category.SubCategory, url.QueryEscape(q.SearchString), q.Page), nil
}