From 348725476bfbb052cf01ac8629d231c359a6f71d Mon Sep 17 00:00:00 2001 From: Jeena Date: Fri, 21 Feb 2014 12:05:10 +0100 Subject: [PATCH] fixed urlify --- js/application.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/application.js b/js/application.js index e20c39b..ebacb08 100644 --- a/js/application.js +++ b/js/application.js @@ -64,8 +64,8 @@ String.prototype.capitalize = function() { } String.prototype.urlify = function() { - var exp = /^\>(\b(http):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; - return this.replace(exp,"$1"); + var exp = /[^\>](https?:\/\/[^\s\<]*)/ig; + return this.replace(exp," $1"); } if(!window.app) window.app = new App();