1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Do not strip tags for entry title

Some technical blogs have titles like "</some-title>" or "This is some <code>source code</code>".

Miniflux was removing these elements which prevent rendering the title correctly.
This commit is contained in:
Frédéric Guillot 2021-01-03 11:33:10 -08:00 committed by fguillot
parent f0610bdd9c
commit 291bf96d15
7 changed files with 62 additions and 16 deletions

View file

@ -62,7 +62,6 @@ func (r *rssFeed) Transform(baseURL string) *model.Feed {
if entry.Author == "" {
entry.Author = r.feedAuthor()
}
entry.Author = sanitizer.StripTags(entry.Author)
if entry.URL == "" {
entry.URL = feed.SiteURL
@ -111,7 +110,7 @@ func (r rssFeed) feedAuthor() string {
case r.Webmaster != "":
author = r.Webmaster
}
return strings.TrimSpace(author)
return sanitizer.StripTags(strings.TrimSpace(author))
}
type rssLink struct {
@ -227,7 +226,7 @@ func (r *rssItem) entryAuthor() string {
author = r.DublinCoreCreator
}
return strings.TrimSpace(author)
return sanitizer.StripTags(strings.TrimSpace(author))
}
func (r *rssItem) entryHash() string {
@ -258,7 +257,7 @@ func (r *rssItem) entryTitle() string {
}
}
return strings.TrimSpace(sanitizer.StripTags(title))
return strings.TrimSpace(title)
}
func (r *rssItem) entryContent() string {