aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader/rss
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2017-12-11 22:16:32 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2017-12-11 22:16:32 -0800
commit33445e5b681bbdffaf0925ed020ecdcc49687f15 (patch)
tree4c82a43cd84e57823c0c570a00380b4eb8f8390b /reader/rss
parent87ccad5c7f1edf8bce37af547ca1659326398fa8 (diff)
Add the possibility to define rewrite rules for each feed
Diffstat (limited to 'reader/rss')
-rw-r--r--reader/rss/parser_test.go4
-rw-r--r--reader/rss/rss.go3
2 files changed, 3 insertions, 4 deletions
diff --git a/reader/rss/parser_test.go b/reader/rss/parser_test.go
index f92be50..3abdd17 100644
--- a/reader/rss/parser_test.go
+++ b/reader/rss/parser_test.go
@@ -94,7 +94,7 @@ func TestParseRss2Sample(t *testing.T) {
t.Errorf("Incorrect entry title, got: %s", feed.Entries[0].Title)
}
- if feed.Entries[0].Content != `How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia&#39;s <a href="http://howe.iki.rssi.ru/GCTC/gctc_e.htm" rel="noopener noreferrer" target="_blank" referrerpolicy="no-referrer">Star City</a>.` {
+ if feed.Entries[0].Content != `How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia's <a href="http://howe.iki.rssi.ru/GCTC/gctc_e.htm">Star City</a>.` {
t.Errorf("Incorrect entry content, got: %s", feed.Entries[0].Content)
}
}
@@ -383,7 +383,7 @@ func TestParseEntryWithContentEncoded(t *testing.T) {
t.Error(err)
}
- if feed.Entries[0].Content != `<p><a href="http://www.example.org/" rel="noopener noreferrer" target="_blank" referrerpolicy="no-referrer">Example</a>.</p>` {
+ if feed.Entries[0].Content != `<p><a href="http://www.example.org/">Example</a>.</p>` {
t.Errorf("Incorrect entry content, got: %s", feed.Entries[0].Content)
}
}
diff --git a/reader/rss/rss.go b/reader/rss/rss.go
index 5573986..e5800b6 100644
--- a/reader/rss/rss.go
+++ b/reader/rss/rss.go
@@ -15,7 +15,6 @@ import (
"github.com/miniflux/miniflux2/helper"
"github.com/miniflux/miniflux2/model"
"github.com/miniflux/miniflux2/reader/date"
- "github.com/miniflux/miniflux2/reader/processor"
)
type rssFeed struct {
@@ -211,7 +210,7 @@ func (r *rssItem) Transform() *model.Entry {
entry.Date = r.GetDate()
entry.Author = r.GetAuthor()
entry.Hash = r.GetHash()
- entry.Content = processor.ItemContentProcessor(entry.URL, r.GetContent())
+ entry.Content = r.GetContent()
entry.Title = strings.TrimSpace(r.Title)
entry.Enclosures = r.GetEnclosures()