From 39b6d7a179aa21b347acc0277da7270b93997ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Mon, 14 Jul 2014 22:49:26 +0100 Subject: [PATCH] Fix URL regex Old one doesn't match umlauts and other unicode stuff New one is a lot more general and similar to what angular uses --- js/plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/plugins.js b/js/plugins.js index e251a5d..0de3850 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -111,7 +111,7 @@ plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce) { */ plugins.factory('userPlugins', function() { - var urlRegexp = RegExp(/(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/); + var urlRegexp = RegExp(/(ftp|https?):\/\/\S*[^\s.;,(){}<>]/) /* * Spotify Embedded Player