projects
/
modest
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
206b438
)
Fix regular expression used to check domain names.
author
Alberto Garcia
<agarcia@igalia.com>
Wed, 28 Nov 2007 10:01:54 +0000
(10:01 +0000)
committer
Alberto Garcia
<agarcia@igalia.com>
Wed, 28 Nov 2007 10:01:54 +0000
(10:01 +0000)
This one allows things like '10.0.1.1'
pmo-trunk-r3831
src/modest-text-utils.c
patch
|
blob
|
history
diff --git
a/src/modest-text-utils.c
b/src/modest-text-utils.c
index
c054a5e
..
f529d18
100644
(file)
--- a/
src/modest-text-utils.c
+++ b/
src/modest-text-utils.c
@@
-1218,7
+1218,7
@@
modest_text_utils_validate_domain_name (const gchar *domain)
{
gboolean valid = FALSE;
regex_t rx;
{
gboolean valid = FALSE;
regex_t rx;
- const gchar* domain_regex = "^[a-z0-9]([.]?[a-z0-9-])*[a-z0-9]$";
+ const gchar* domain_regex = "^([a-z0-9-]*[a-z0-9]\\.)+[a-z0-9-]*[a-z0-9]$";
g_return_val_if_fail (domain, FALSE);
g_return_val_if_fail (domain, FALSE);