aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-utils.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-04-22 03:40:56 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-04-22 03:40:56 +0800
commitae63d6eb052d128e4195902d927769fd6d56ce9e (patch)
tree5b8ded96e1f9c71c9218e7ab1c7356fd803aa9d4 /libempathy/empathy-utils.c
parent638822cddf39c04c746d2196f6738b6d06056a8a (diff)
downloadgsoc2013-empathy-ae63d6eb052d128e4195902d927769fd6d56ce9e.tar
gsoc2013-empathy-ae63d6eb052d128e4195902d927769fd6d56ce9e.tar.gz
gsoc2013-empathy-ae63d6eb052d128e4195902d927769fd6d56ce9e.tar.bz2
gsoc2013-empathy-ae63d6eb052d128e4195902d927769fd6d56ce9e.tar.lz
gsoc2013-empathy-ae63d6eb052d128e4195902d927769fd6d56ce9e.tar.xz
gsoc2013-empathy-ae63d6eb052d128e4195902d927769fd6d56ce9e.tar.zst
gsoc2013-empathy-ae63d6eb052d128e4195902d927769fd6d56ce9e.zip
Add support for apt:// URLS. Fixes bug #529049 (Gaƫtan Podevijn).
svn path=/trunk/; revision=1028
Diffstat (limited to 'libempathy/empathy-utils.c')
-rw-r--r--libempathy/empathy-utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 9132cbfc9..2c7ce1de0 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -58,6 +58,7 @@ empathy_substring (const gchar *str,
/*
* Regular Expression code to match urls.
*/
+#define APTCHARS "-A-Za-z0-9,-."
#define USERCHARS "-A-Za-z0-9"
#define PASSCHARS "-A-Za-z0-9,?;.:/!%$^*&~\"#'"
#define HOSTCHARS "-A-Za-z0-9_"
@@ -91,6 +92,10 @@ regex_init (void)
"(www|ftp)[" HOSTCHARS "]*\\.[" HOSTCHARS ".]+"
"(:[0-9]+)?(" URLPATH ")?";
break;
+ case EMPATHY_REGEX_APT:
+ expression =
+ "apt://[" APTCHARS "]*";
+ break;
case EMPATHY_REGEX_EMAIL:
expression =
"(mailto:)?[a-z0-9][a-z0-9.-]*@[a-z0-9]"