From 2cc36e14ee884e910bc4a9099834d6110a04c981 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Sat, 2 Dec 2017 17:31:09 -0800 Subject: cleanHeaderImage stub --- models/item/item.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'models') 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 = "" + } +} -- cgit v1.2.3