diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-22 10:24:07 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-22 10:24:07 +0200 |
commit | bcba311485074e75ad62f338cc8159bf99522fab (patch) | |
tree | 56d011f2a48c87e9e727c016d31f14ee47da83e1 /js/app/services/businesslayer/feedbusinesslayer.coffee | |
parent | 5f71477e1a8ac9704e5c580a5bb5d8d820a43a19 (diff) |
add http:// to feed url if its not specified, fix #111 and fix #61
Diffstat (limited to 'js/app/services/businesslayer/feedbusinesslayer.coffee')
-rw-r--r-- | js/app/services/businesslayer/feedbusinesslayer.coffee | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/js/app/services/businesslayer/feedbusinesslayer.coffee b/js/app/services/businesslayer/feedbusinesslayer.coffee index 0ad81d875..9d2f37390 100644 --- a/js/app/services/businesslayer/feedbusinesslayer.coffee +++ b/js/app/services/businesslayer/feedbusinesslayer.coffee @@ -139,6 +139,8 @@ FeedModel, NewLoading, _ExistsError, Utils) -> throw new Error('Url must not be empty') url = url.trim() + if url.indexOf('http') != 0 + url = 'http://' + url if @_feedModel.getByUrl(url) throw new _ExistsError('Exists already') |