Monorepo for Tangled tangled.org

appview/pages: use queryParams func to build pagination URLs; wrap in safeUrl

when constructing a url using url.Values.Encode, we need to avoid
escaping the `=` symbol, which is performed by the default urlescaper
behavior in href contexts; so we wrap the call with safeUrl.

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li ec4bc88f 9a5e3719

verified
+4 -4
+2 -2
appview/pages/templates/fragments/pagination.html
··· 1 {{ define "fragments/pagination" }} 2 - {{/* Params: Page (pagination.Page), TotalCount (int), BasePath (string), QueryParams (string) */}} 3 {{ $page := .Page }} 4 {{ $totalCount := .TotalCount }} 5 {{ $basePath := .BasePath }} 6 - {{ $queryParams := .QueryParams }} 7 8 {{ $prev := $page.Previous.Offset }} 9 {{ $next := $page.Next.Offset }}
··· 1 {{ define "fragments/pagination" }} 2 + {{/* Params: Page (pagination.Page), TotalCount (int), BasePath (string), QueryParams (url.Values) */}} 3 {{ $page := .Page }} 4 {{ $totalCount := .TotalCount }} 5 {{ $basePath := .BasePath }} 6 + {{ $queryParams := safeUrl .QueryParams.Encode }} 7 8 {{ $prev := $page.Previous.Offset }} 9 {{ $next := $page.Next.Offset }}
+1 -1
appview/pages/templates/repo/issues/issues.html
··· 80 "Page" .Page 81 "TotalCount" .IssueCount 82 "BasePath" (printf "/%s/issues" .RepoInfo.FullName) 83 - "QueryParams" (printf "state=%s&q=%s" $state .FilterQuery) 84 ) }} 85 {{ end }} 86 {{ end }}
··· 80 "Page" .Page 81 "TotalCount" .IssueCount 82 "BasePath" (printf "/%s/issues" .RepoInfo.FullName) 83 + "QueryParams" (queryParams "state" $state "q" .FilterQuery) 84 ) }} 85 {{ end }} 86 {{ end }}
+1 -1
appview/pages/templates/repo/pulls/pulls.html
··· 166 "Page" .Page 167 "TotalCount" .PullCount 168 "BasePath" (printf "/%s/pulls" .RepoInfo.FullName) 169 - "QueryParams" (printf "state=%s&q=%s" .FilteringBy.String .FilterQuery) 170 ) }} 171 {{ end }} 172 {{ end }}
··· 166 "Page" .Page 167 "TotalCount" .PullCount 168 "BasePath" (printf "/%s/pulls" .RepoInfo.FullName) 169 + "QueryParams" (queryParams "state" .FilteringBy.String "q" .FilterQuery) 170 ) }} 171 {{ end }} 172 {{ end }}