aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2017-12-02 17:31:09 -0800
committerAdam Mathes <adam@trenchant.org>2017-12-02 17:31:09 -0800
commit2cc36e14ee884e910bc4a9099834d6110a04c981 (patch)
tree09d44bce6faf89b3b73028e51d95fa1a066f134c /models
parent57411d28bdc6a51a03fca09ad032b159a2d44831 (diff)
downloadneko-2cc36e14ee884e910bc4a9099834d6110a04c981.tar.gz
neko-2cc36e14ee884e910bc4a9099834d6110a04c981.tar.bz2
neko-2cc36e14ee884e910bc4a9099834d6110a04c981.zip
cleanHeaderImage stub
Diffstat (limited to 'models')
-rw-r--r--models/item/item.go7
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 = ""
+ }
+}