Add underscore back to subdomain

This commit is contained in:
Hillel Coren 2017-11-28 10:57:45 +02:00
parent 4e7cc56ed1
commit 710b6fe458
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class SaveClientPortalSettings extends Request
if (Utils::isNinja()) {
if ($this->custom_link == 'subdomain') {
$subdomain = substr(strtolower($input['subdomain']), 0, MAX_SUBDOMAIN_LENGTH);
$input['subdomain'] = preg_replace('/[^a-zA-Z0-9\-\.]/', '', $subdomain);
$input['subdomain'] = preg_replace('/[^a-zA-Z0-9_\-\.]/', '', $subdomain);
$input['iframe_url'] = null;
} else {
$iframeURL = substr(strtolower($input['iframe_url']), 0, MAX_IFRAME_URL_LENGTH);

View File

@ -456,7 +456,7 @@ iframe.src = '{{ rtrim(SITE_URL ,'/') }}/view/'
var input = $('#subdomain');
var val = input.val();
if (!val) return;
val = val.replace(/[^a-zA-Z0-9\-]/g, '').toLowerCase().substring(0, {{ MAX_SUBDOMAIN_LENGTH }});
val = val.replace(/[^a-zA-Z0-9_\-]/g, '').toLowerCase().substring(0, {{ MAX_SUBDOMAIN_LENGTH }});
input.val(val);
}