diff --git a/reader/rss/parser_test.go b/reader/rss/parser_test.go
index 67672127..197994c7 100644
--- a/reader/rss/parser_test.go
+++ b/reader/rss/parser_test.go
@@ -998,6 +998,25 @@ func TestParseFeedTitleWithHTMLEntity(t *testing.T) {
}
}
+func TestParseFeedTitleWithUnicodeEntityAndCdata(t *testing.T) {
+ data := `
+
+
+ https://example.org/
+
+
+ `
+
+ feed, err := Parse("https://example.org/", bytes.NewBufferString(data))
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if feed.Title != `Jenny’s Newsletter` {
+ t.Errorf(`Incorrect title, got: %q`, feed.Title)
+ }
+}
+
func TestParseItemTitleWithHTMLEntity(t *testing.T) {
data := `
diff --git a/reader/rss/rss.go b/reader/rss/rss.go
index 01caada4..db082393 100644
--- a/reader/rss/rss.go
+++ b/reader/rss/rss.go
@@ -53,7 +53,7 @@ func (r *rssFeed) Transform(baseURL string) *model.Feed {
feed.FeedURL = feedURL
}
- feed.Title = strings.TrimSpace(r.Title)
+ feed.Title = html.UnescapeString(strings.TrimSpace(r.Title))
if feed.Title == "" {
feed.Title = feed.SiteURL
}