From 7eee529c9f166dad8a77cd08cf1c69c18012895f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Jul 2017 16:28:56 +0200 Subject: [PATCH] Can use - and _ into website alias --- htdocs/websites/index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/websites/index.php b/htdocs/websites/index.php index 14bb0b3a90f..c8ba93c86f1 100644 --- a/htdocs/websites/index.php +++ b/htdocs/websites/index.php @@ -174,10 +174,11 @@ if ($action == 'add') $error++; $action='create'; } - else if (! preg_match('/^[a-z0-9]+$/i', $objectpage->pageurl)) + else if (! preg_match('/^[a-z0-9\-\_]+$/i', $objectpage->pageurl)) { - $error++; setEventMessages($langs->transnoentities("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities('WEBSITE_PAGENAME')), null, 'errors'); + $error++; + $action='create'; } if (empty($objectpage->title)) {