aboutsummaryrefslogtreecommitdiff
path: root/backend/data.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/data.go')
-rw-r--r--backend/data.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/data.go b/backend/data.go
index bc3136c..2d9f97d 100644
--- a/backend/data.go
+++ b/backend/data.go
@@ -11,6 +11,7 @@ import (
"log/slog"
"math/rand"
"net/http"
+ "net/url"
"regexp"
"strings"
)
@@ -93,8 +94,8 @@ func (d *data) handleGeneric(w http.ResponseWriter, r *http.Request, name string
exec := "base.html"
if r.Context().Value(isUpdateKey).(bool) {
exec = "body"
- w.Header().Set("Updated-Title", d.Title())
- w.Header().Set("Updated-Quote", d.Quote)
+ w.Header().Set("Updated-Title", url.QueryEscape(d.Title()))
+ w.Header().Set("Updated-Quote", url.QueryEscape(d.Quote))
}
if custom == nil {
err = t.ExecuteTemplate(w, exec, d)