cmd/sgblog/http.go | 10 ++++++++-- common.go | 2 +- diff --git a/cmd/sgblog/http.go b/cmd/sgblog/http.go index 380dba98b14b93d5c86091cb2910bed2029d0e780056cfcef1c478b0e92551a6..1d45a3eef3e9d7562638d1eec57f84620a115d936d4cebf41c71f7ddc66ada6d 100644 --- a/cmd/sgblog/http.go +++ b/cmd/sgblog/http.go @@ -550,6 +550,12 @@ var categories []atom.Category for _, topic := range parseTopics(getNote(topicsTree, commit.Hash)) { categories = append(categories, atom.Category{Term: topic}) } + htmlized := make([]string, 0, len(lines)) + htmlized = append(htmlized, "
")
+ for _, l := range lines[2:] {
+ htmlized = append(htmlized, html.EscapeString(l))
+ }
+ htmlized = append(htmlized, "")
feed.Entry = append(feed.Entry, &atom.Entry{
Title: lines[0],
ID: "urn:uuid:" + bytes2uuid(commit.Hash[:]),
@@ -561,8 +567,8 @@ Published: atom.Time(commit.Author.When),
Updated: atom.Time(commit.Author.When),
Summary: &atom.Text{Type: "text", Body: lines[0]},
Content: &atom.Text{
- Type: "text",
- Body: strings.Join(lines[2:], "\n"),
+ Type: "html",
+ Body: strings.Join(htmlized, "\n"),
},
Category: categories,
})
diff --git a/common.go b/common.go
index 0ef3e8a66a1bba0fea24aa357c4f7718e67dbd2e38b2d66ca184744d25b81757..9ed6d4fe4380f947874acdedf42720f148a0ff6a195dfb8b4c9b2cfb3f8fb949 100644
--- a/common.go
+++ b/common.go
@@ -2,6 +2,6 @@ // SGBlog -- Git-backed CGI/inetd blogging/phlogging engine
package sgblog
const (
- Version = "0.10.1"
+ Version = "0.11.0"
WhenFmt = "2006-01-02 15:04:05Z07:00"
)