From 325c0fb2356ad7af8c764e87739ec6c4f8b67128 Mon Sep 17 00:00:00 2001
From: Pinga <121483313+getpinga@users.noreply.github.com>
Date: Wed, 29 Jan 2025 15:04:40 +0200
Subject: [PATCH] Fixed #205
---
cp/app/Controllers/SystemController.php | 4 ++++
cp/resources/views/admin/system/createTld.twig | 1 +
cp/resources/views/partials/js-tlds.twig | 6 ++++--
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/cp/app/Controllers/SystemController.php b/cp/app/Controllers/SystemController.php
index da609f6..b9786f8 100644
--- a/cp/app/Controllers/SystemController.php
+++ b/cp/app/Controllers/SystemController.php
@@ -409,6 +409,9 @@ class SystemController extends Controller
case 'korean':
$idntable = '/^[가-힣0-9]+$/u';
break;
+ case 'arabic':
+ $idntable = '/^(?!-)(?!.*--)[\x{0621}-\x{064A}\x{0660}-\x{0669}\x{0671}-\x{06D3}-]{1,63}(? 'Cyrillic',
'/^[ぁ-んァ-ン一-龯々]+$/u' => 'Japanese',
'/^[가-힣]+$/u' => 'Korean',
+ '/^(?!-)(?!.*--)[\x{0621}-\x{064A}\x{0660}-\x{0669}\x{0671}-\x{06D3}-]{1,63}(? 'Arabic',
];
$idnRegex = $tld['idn_table'];
diff --git a/cp/resources/views/admin/system/createTld.twig b/cp/resources/views/admin/system/createTld.twig
index 1267c30..9a29222 100644
--- a/cp/resources/views/admin/system/createTld.twig
+++ b/cp/resources/views/admin/system/createTld.twig
@@ -51,6 +51,7 @@
+
{{ __('Choose the script type that the TLD will support. Options include ASCII, Cyrillic, Japanese, and Korean.') }}
diff --git a/cp/resources/views/partials/js-tlds.twig b/cp/resources/views/partials/js-tlds.twig
index dcb418b..eeaa2a2 100644
--- a/cp/resources/views/partials/js-tlds.twig
+++ b/cp/resources/views/partials/js-tlds.twig
@@ -26,20 +26,22 @@
function actionsFormatter(cell, formatterParams, onRendered) {
return ` `;
}
-
+
// Mapping of database string values to script names
const dbValueToScriptName = {
'/^(?!-)(?!.*--)[A-Z0-9-]{1,63}(?