reverted commit of url validation that didn't validate parts of urls

pull/217/head
Christophe Vandeplas 2013-07-16 15:44:03 +02:00
parent e13c2e883c
commit 00e463bdff
2 changed files with 2 additions and 1 deletions

View File

@ -604,7 +604,8 @@ class Attribute extends AppModel {
}
break;
case 'url':
if (preg_match('#^(http|ftp)(s)?\:\/\/((([a-z|0-9|\-]{1,25})(\.)?){2,7})($|/.*$)#i', $value) && !preg_match("#\n#", $value)) {
// no newline
if (!preg_match("#\n#", $value)) {
$returnValue = true;
}
break;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB