aboutsummaryrefslogtreecommitdiff
path: root/cmd/http/feed.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/http/feed.go')
-rw-r--r--cmd/http/feed.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/http/feed.go b/cmd/http/feed.go
index 59f5ad1..e14c250 100644
--- a/cmd/http/feed.go
+++ b/cmd/http/feed.go
@@ -1,6 +1,7 @@
package main
import (
+ "net/url"
"time"
)
@@ -29,8 +30,8 @@ func generateFeed(domain string, posts []*Post) []byte {
entry := `
<entry>
<title>` + post.Title + `</title>
- <link href="https://` + domain + `/blog/` + post.File + `"/>
- <id>https://` + domain + `/blog/` + post.File + `</id>
+ <link href="https://` + domain + `/blog/` + url.QueryEscape(post.File) + `"/>
+ <id>https://` + domain + `/blog/` + url.QueryEscape(post.File) + `</id>
<published>` + post.Date + `T00:00:00.000Z</published>
<updated>` + post.Date + `T00:00:00.000Z</updated>
<summary>Blog post</summary>`