[BUGFIX] isValidUrl() idna converts whole URI
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / DataHandling / DataHandler.php
index 83d297a..3fdf322 100644 (file)
@@ -2504,12 +2504,8 @@ class DataHandler {
                                        $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value);
                                        break;
                                case 'domainname':
-                                       if (!preg_match('/^[a-z0-9\\.\\-]*$/i', $value)) {
-                                               GeneralUtility::requireOnce(PATH_typo3 . 'contrib/idna/idna_convert.class.php');
-                                               $idnaConvert = new \idna_convert();
-                                               $idnaConvert->set_parameter('idn_version', '2008');
-                                               $value = $idnaConvert->encode($value);
-                                               unset($idnaConvert);
+                                       if (!preg_match('/^[a-z0-9.\\-]*$/i', $value)) {
+                                               $value = GeneralUtility::idnaEncode($value);
                                        }
                                        break;
                                default: