Add - as a possible character in urls
authorJulien Valroff <julien@kirya.net>
Mon, 31 May 2010 04:39:11 +0000 (06:39 +0200)
committerJulien Valroff <julien@kirya.net>
Mon, 31 May 2010 04:39:11 +0000 (06:39 +0200)
debian/patches/006_improve-url-regex.diff

index 3e39853..a7ec75d 100644 (file)
@@ -10,7 +10,7 @@ Bug: http://code.google.com/p/pino-twitter/issues/detail?id=277
                tags = new Regex("#([A-Za-z0-9_\\p{Latin}\\p{Greek}]+)");
                groups = new Regex("(^|\\s)!([A-Za-z0-9_]+)"); //for identi.ca groups
 -              urls = new Regex("((http|https|ftp)://([\\S]+))"); //need something better
-+              urls = new Regex("((https?|ftp)://([A-Za-z0-9+&@#/%?=~_|!:,.;]*)([A-Za-z0-9+&@#/%=~_|$]))"); // still needs to be improved for urls containing () such as wikipedia
++              urls = new Regex("((https?|ftp)://([A-Za-z0-9+&@#/%?=~_|!:,.;-]*)([A-Za-z0-9+&@#/%=~_|$]))"); // still needs to be improved for urls containing () such as wikipedia
                
                // characters must be cleared to know direction of text
                clear_notice = new Regex("[: \n\t\r♻♺]+|@[^ ]+");