aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2018-01-29 19:20:37 -0800
committerAdam Mathes <adam@trenchant.org>2018-01-29 19:20:37 -0800
commit802fcd6135c9d78ab0f17dd6d1fd5a448a94787a (patch)
tree7580d47055ab90efa35f0b73cc88649ddb1201a4 /models
parent2cc36e14ee884e910bc4a9099834d6110a04c981 (diff)
downloadneko-802fcd6135c9d78ab0f17dd6d1fd5a448a94787a.tar.gz
neko-802fcd6135c9d78ab0f17dd6d1fd5a448a94787a.tar.bz2
neko-802fcd6135c9d78ab0f17dd6d1fd5a448a94787a.zip
deal with relative urls in feed resolution, sorta
Diffstat (limited to 'models')
-rw-r--r--models/feed/feed.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/feed/feed.go b/models/feed/feed.go
index 0a043f2..70b939a 100644
--- a/models/feed/feed.go
+++ b/models/feed/feed.go
@@ -155,5 +155,10 @@ func ResolveFeedURL(url string) string {
if f == "" {
f = url
}
+
+ // if we don't start with http[s] its probably relative
+ if f[0] != 'h' {
+ f = url + f
+ }
return f
}