Fix: don't use urlx for pagination

goware/urlx fails if the supplied URL doesn't contain a host?
(The URL passed to the CreatePaginator() template function was actually a path,
which did not contain a host or a scheme.)
This commit is contained in:
VnPower
2024-10-02 19:54:44 +07:00
parent bbf77baec3
commit c78b207231
+1 -3
View File
@@ -8,8 +8,6 @@ import (
"regexp"
"strings"
"time"
"github.com/goware/urlx"
"codeberg.org/vnpower/pixivfe/v2/core"
)
@@ -141,7 +139,7 @@ func CreatePaginator(base, ending string, current_page, max_page int) HTML {
pages += `<div class="pagination-buttons">`
{ // "jump to page" <form>
hidden_section := ""
urlParsed, err := urlx.Parse(base)
urlParsed, err := url.Parse(base)
if err != nil {
panic(err)
}