Escape URL parameters in Sprintf

This commit is contained in:
iacore
2024-01-10 10:30:40 +00:00
parent 138d22ca81
commit b97b74c19d
7 changed files with 29 additions and 24 deletions
+1 -3
View File
@@ -1,14 +1,12 @@
package handler
import (
"fmt"
"codeberg.org/vnpower/pixivfe/models"
"github.com/goccy/go-json"
)
func (p *PixivClient) GetNewestFromFollowing(mode, page, token string) ([]models.IllustShort, error) {
URL := fmt.Sprintf(NewestFromFollowURL, "illust", mode, page)
URL := UrlSprintf(NewestFromFollowURL, "illust", mode, page)
var body struct {
Thumbnails json.RawMessage `json:"thumbnails"`