aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2017-02-25 17:50:38 -0800
committerAdam Mathes <adam@trenchant.org>2017-02-25 17:50:38 -0800
commit8359198e5edb272311e10c77e6bf4cb662abd5ec (patch)
tree064589554fa36d5bf6c17436d39b68964034b1c2 /models
parent09af7d2f740eaa639fdcc2a7aa8c2ee1e3c3dd4d (diff)
downloadneko-8359198e5edb272311e10c77e6bf4cb662abd5ec.tar.gz
neko-8359198e5edb272311e10c77e6bf4cb662abd5ec.tar.bz2
neko-8359198e5edb272311e10c77e6bf4cb662abd5ec.zip
silent by default, verbose option added. -feeds cmd line option added
Diffstat (limited to 'models')
-rw-r--r--models/item/item.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/models/item/item.go b/models/item/item.go
index 9e22aa8..5a4c274 100644
--- a/models/item/item.go
+++ b/models/item/item.go
@@ -115,8 +115,15 @@ func Filter(max_id int64, feed_id int64, unread_only bool, starred_only bool) ([
log.Println(err)
return nil, err
}
+
+ // sanitize all fields from external input
+ // should do this at ingest time, probably, for efficiency
+ // but still may need to adjust rules
+ i.Title = p.Sanitize(i.Title)
i.Description = p.Sanitize(i.Description)
- // TODO: sanitize other fields
+ i.Url = p.Sanitize(i.Url)
+ i.FeedTitle = p.Sanitize(i.FeedTitle)
+ i.FeedUrl = p.Sanitize(i.FeedUrl)
items = append(items, i)
}
if err = rows.Err(); err != nil {