Update function.validateDomain.php

Fix pattern to support IDN TLDs, like .рф that becomes .xn--p1ai in punycode at this point. (inserted as .рф in domain edit page)
This commit is contained in:
misdoro
2013-08-25 20:46:08 +02:00
parent ef688bd0c0
commit d90af956de

View File

@@ -42,7 +42,7 @@ function validateDomain($domainname)
// a dash (-) in it. As the PHP_VERSION constant
// gives also patch-brandings, e.g. '5.3.2-pl0-gentoo'
// we just always use our regex
$pattern = '/^http:\/\/([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6}$/i';
$pattern = '/^http:\/\/([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z0-9\-]{2,8}$/i';
if(preg_match($pattern, $domainname_tmp))
{
return $domainname;