diff --git a/cmd/root.go b/cmd/root.go index 15b3dbf..d2ddd05 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -12,7 +12,7 @@ import ( ) const ( - ReleaseVersion string = "3.2.7" + ReleaseVersion string = "3.2.8" ) var ( diff --git a/cmd/sort.go b/cmd/sort.go index bc76645..3e5a8d2 100644 --- a/cmd/sort.go +++ b/cmd/sort.go @@ -90,6 +90,10 @@ Loop: return first, last, nil } +func pathUrlEscape(path string) string { + return strings.Replace(path, `'`, `'`, -1) +} + func paginateSorted(path, first, last, queryParams string, regexes *regexes, formats types.Types) (string, error) { split, err := split(path, regexes) if err != nil { @@ -144,31 +148,31 @@ func paginateSorted(path, first, last, queryParams string, regexes *regexes, for html.WriteString(`
`) - html.WriteString(fmt.Sprintf(``, + html.WriteString(fmt.Sprintf(``, Prefix, mediaPrefix, - first, + pathUrlEscape(first), queryParams, firstStatus)) - html.WriteString(fmt.Sprintf(``, + html.WriteString(fmt.Sprintf(``, Prefix, mediaPrefix, - prevPage, + pathUrlEscape(prevPage), queryParams, prevStatus)) - html.WriteString(fmt.Sprintf(``, + html.WriteString(fmt.Sprintf(``, Prefix, mediaPrefix, - nextPage, + pathUrlEscape(nextPage), queryParams, nextStatus)) - html.WriteString(fmt.Sprintf(``, + html.WriteString(fmt.Sprintf(``, Prefix, mediaPrefix, - last, + pathUrlEscape(last), queryParams, lastStatus)) |