diff --git a/controllers/story.js b/controllers/story.js index 0e7744071a..83c64ec94b 100644 --- a/controllers/story.js +++ b/controllers/story.js @@ -119,10 +119,14 @@ exports.storySubmission = function(req, res, next) { .replace(/[^a-z0-9]/gi, ' ') .replace(/\s+/g, ' ') .toLowerCase(); + var link = data.link; + if (link.search(/^https?:\/\//g) === -1) { + link = 'http://' + link; + } var story = new Story({ headline: data.headline, timePosted: Date.now(), - link: data.link, + link: link, description: data.description, rank: 0, upVotes: 0, diff --git a/views/stories/stories.jade b/views/stories/stories.jade index 9122d66c37..c3dcc96caa 100644 --- a/views/stories/stories.jade +++ b/views/stories/stories.jade @@ -19,11 +19,6 @@ h3 $(li).html("
" + "
" + - "
" + - "
" + - "" + - "
" + - "
" + "
" + "" + rank + "" + "
" +