From d3a5151ab49317a66deb220ef5d4193d7fb71b8c Mon Sep 17 00:00:00 2001
From: Umputun
Date: Sun, 14 Jul 2019 11:57:03 -0500
Subject: [PATCH] switch rss parent to blockquote only
---
backend/app/rest/api/rss.go | 3 +--
backend/app/rest/api/rss_test.go | 6 +++---
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/backend/app/rest/api/rss.go b/backend/app/rest/api/rss.go
index 11a49ee2..8dafd5ab 100644
--- a/backend/app/rest/api/rss.go
+++ b/backend/app/rest/api/rss.go
@@ -159,8 +159,7 @@ func (s *rss) toRssFeed(url string, comments []store.Comment, description string
parentComment, err := s.dataService.Get(c.Locator, c.ParentID, store.User{})
if err == nil {
f.Title = fmt.Sprintf("%s > %s", c.User.Name, parentComment.User.Name)
- f.Description = f.Description + "" + parentComment.Snippet(300) +
- "
"
+ f.Description = f.Description + "" + parentComment.Snippet(300) + "
"
} else {
log.Printf("[WARN] failed to get info about parent comment, %s", err)
}
diff --git a/backend/app/rest/api/rss_test.go b/backend/app/rest/api/rss_test.go
index b67dfaad..bab6c832 100644
--- a/backend/app/rest/api/rss_test.go
+++ b/backend/app/rest/api/rss_test.go
@@ -161,7 +161,7 @@ func TestServer_RssWithReply(t *testing.T) {
-
developer one > developer one
https://radio-t.com/blah10#remark42__comment-comment-id-2
- xyz test<p><blockquote><summary>test 123</summary></blockquote></p>
+ xyz test<blockquote><p>test 123</p></blockquote>
developer one
comment-id-2
%s
@@ -247,7 +247,7 @@ func TestServer_RssReplies(t *testing.T) {
-
user3 > user1
https://radio-t.com/blah1#remark42__comment-comment-3
- reply to c1 from user3<p><blockquote><summary>c1</summary></blockquote></p>
+ reply to c1 from user3<blockquote><p>c1</p></blockquote>
user3
comment-3
%s
@@ -255,7 +255,7 @@ func TestServer_RssReplies(t *testing.T) {
-
user2 > user1
https://radio-t.com/blah1#remark42__comment-comment-2
- reply to c1 from user2<p><blockquote><summary>c1</summary></blockquote></p>
+ reply to c1 from user2<blockquote><p>c1</p></blockquote>
user2
comment-2
%s