diff --git a/pkg/templates/template_funcs.go b/pkg/templates/template_funcs.go index 30753e2..edf61d8 100644 --- a/pkg/templates/template_funcs.go +++ b/pkg/templates/template_funcs.go @@ -7,6 +7,7 @@ import ( "html/template" "net/http" "net/url" + "sort" "strings" "time" @@ -211,6 +212,10 @@ func QueryPlus(r *http.Request) func(...interface{}) template.URL { ) } } + + // Sort them deterministically. + sort.Strings(parts) + return template.URL(strings.Join(parts, "&")) } } diff --git a/web/templates/photo/gallery.html b/web/templates/photo/gallery.html index cba81a1..4b5fac5 100644 --- a/web/templates/photo/gallery.html +++ b/web/templates/photo/gallery.html @@ -212,10 +212,10 @@
@@ -345,6 +345,9 @@ + + +