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:
@@ -42,7 +42,7 @@ function validateDomain($domainname)
|
|||||||
// a dash (-) in it. As the PHP_VERSION constant
|
// a dash (-) in it. As the PHP_VERSION constant
|
||||||
// gives also patch-brandings, e.g. '5.3.2-pl0-gentoo'
|
// gives also patch-brandings, e.g. '5.3.2-pl0-gentoo'
|
||||||
// we just always use our regex
|
// 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))
|
if(preg_match($pattern, $domainname_tmp))
|
||||||
{
|
{
|
||||||
return $domainname;
|
return $domainname;
|
||||||
|
|||||||
Reference in New Issue
Block a user