diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-08-31 22:14:15 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-08-31 22:16:31 +0800 |
commit | fcd22fbdd8d4545b04e15f3bcb6e4384e7d0ded6 (patch) | |
tree | 627b138a8d569ca39bbae3e89b8ff486450006f7 /libempathy-gtk | |
parent | 022c807d5dee69a54c565051cea62571b29d3ebf (diff) | |
download | gsoc2013-empathy-fcd22fbdd8d4545b04e15f3bcb6e4384e7d0ded6.tar gsoc2013-empathy-fcd22fbdd8d4545b04e15f3bcb6e4384e7d0ded6.tar.gz gsoc2013-empathy-fcd22fbdd8d4545b04e15f3bcb6e4384e7d0ded6.tar.bz2 gsoc2013-empathy-fcd22fbdd8d4545b04e15f3bcb6e4384e7d0ded6.tar.lz gsoc2013-empathy-fcd22fbdd8d4545b04e15f3bcb6e4384e7d0ded6.tar.xz gsoc2013-empathy-fcd22fbdd8d4545b04e15f3bcb6e4384e7d0ded6.tar.zst gsoc2013-empathy-fcd22fbdd8d4545b04e15f3bcb6e4384e7d0ded6.zip |
Correct grouping in the hostname regexp
Correctly group our subregexp otherwise hostnames like the following
won't be recognized due to the way things expand:
a.com
example.c-om
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index e148adab2..8df91745d 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -154,9 +154,10 @@ static guint signals[LAST_SIGNAL] = { 0 }; #define ALPHADIGITDASHS "(["ALPHADIGITDASH"]*)" #define HOSTNUMBER "("DIGITS"\\."DIGITS"\\."DIGITS"\\."DIGITS")" -#define TOPLABEL ALPHAS"|(["ALPHA"]" ALPHADIGITDASHS "["ALPHADIGIT"])" -#define DOMAINLABEL ALPHADIGITS"|(["ALPHADIGIT"]" ALPHADIGITDASHS \ - "["ALPHADIGIT"])" +#define TOPLABEL "("ALPHAS \ + "| (["ALPHA"]"ALPHADIGITDASHS "["ALPHADIGIT"]))" +#define DOMAINLABEL "("ALPHADIGITS"|(["ALPHADIGIT"]" ALPHADIGITDASHS \ + "["ALPHADIGIT"]))" #define HOSTNAME "((" DOMAINLABEL "\\.)+" TOPLABEL ")" /* Based on http://www.ietf.org/rfc/rfc1738.txt (section 5) */ #define HOST "("HOSTNAME "|" HOSTNUMBER")" |