From 7003dad563fbccf66189b6118b7c5fa1776fdf71 Mon Sep 17 00:00:00 2001 From: Alex Scerba Date: Tue, 8 Sep 2026 16:23:06 -0500 Subject: Fix character escaping issues on RSS --- cmd/http/handle.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd/http/handle.go') diff --git a/cmd/http/handle.go b/cmd/http/handle.go index 3d49a59..ac03f6d 100644 --- a/cmd/http/handle.go +++ b/cmd/http/handle.go @@ -3,6 +3,7 @@ package main import ( "bytes" "net/http" + "net/url" "strings" "time" ) @@ -72,6 +73,7 @@ func (app *application) blog(w http.ResponseWriter, r *http.Request) { return } } else if len(path) == 3 { + path[2], _ = url.PathUnescape(path[2]) if !app.fileExists("html/" + path[1] + "/" + path[2] + ".tmpl.html") { app.notFound(w) return @@ -98,6 +100,7 @@ func (app *application) archive(w http.ResponseWriter, r *http.Request) { // Redirect to /blog http.Redirect(w, r, "/blog", http.StatusFound) } else if len(path) == 3 { + path[2], _ = url.PathUnescape(path[2]) if !app.fileExists("html/" + path[1] + "/" + path[2] + ".tmpl.html") { app.notFound(w) return -- cgit v1.2.3