diff options
-rw-r--r-- | models/item/item.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/models/item/item.go b/models/item/item.go index dba6cd4..38e3d2f 100644 --- a/models/item/item.go +++ b/models/item/item.go @@ -171,6 +171,7 @@ func Filter(max_id int64, feed_id int64, unread_only bool, starred_only bool) ([ i.FeedUrl = p.Sanitize(i.FeedUrl) i.FullContent = p.Sanitize(i.FullContent) i.HeaderImage = p.Sanitize(i.HeaderImage) + i.CleanHeaderImage() items = append(items, i) } if err = rows.Err(); err != nil { @@ -178,3 +179,9 @@ func Filter(max_id int64, feed_id int64, unread_only bool, starred_only bool) ([ } return items, nil } + +func (i *Item) CleanHeaderImage() { + if i.HeaderImage == "https://s0.wp.com/i/blank.jpg" { + i.HeaderImage = "" + } +} |