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
This commit is contained in:
Lorenz Hübschle-Schneider 2014-07-14 22:49:26 +01:00
parent 5d0f71820e
commit 39b6d7a179

View file

@ -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