diff options
author | LightningW <webdev@lightning.hu> | 2014-08-23 17:40:40 +0200 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2014-09-01 17:55:22 -0400 |
commit | d1b9118056d35bee43fe07ccc823ae5db7697cbe (patch) | |
tree | c68212c9bb1db901d72ba567133d3e581b9b70aa /src/common | |
parent | fd95c729d5ecdb8a65497ae9b6049748d5a3c127 (diff) |
Fix DOMAIN and EMAIL patterns.
Closes #1107
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/url.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/url.c b/src/common/url.c index 808a73de..a3922345 100644 --- a/src/common/url.c +++ b/src/common/url.c @@ -415,7 +415,7 @@ regex_match (const GRegex *re, const char *word, int *start, int *end) } /* Miscellaneous description --- */ -#define DOMAIN "[a-z0-9][-a-z0-9]*(\\.[-a-z0-9]+)*" +#define DOMAIN "[_a-z0-9][-_a-z0-9]*(\\.[-_a-z0-9]+)*" #define TLD "\\.[a-z][-a-z0-9]*[a-z]" #define IPADDR "[0-9]{1,3}(\\.[0-9]{1,3}){3}" #define IPV6GROUP "([0-9a-f]{0,4})" @@ -610,7 +610,7 @@ re_url (void) } /* EMAIL description --- */ -#define EMAIL "[a-z][-_a-z0-9]+@" "(" HOST_URL ")" +#define EMAIL "[a-z][._%+-a-z0-9]+@" "(" HOST_URL ")" static const GRegex * re_email (void) |