Page 1 of 1

Changes in <HTML> Signup

Posted: Mon Nov 20, 2017 8:33 am
by Aris
Hi.

After converting the Signup form to standard form, I open the <HTML> Signup.

I see and this piece of code:

Code: Select all

else
   if (!preg_match("/^[A-Za-z0-9_!@$.' &]{1,50}$/", $newfullname))
   {
Because this code does not receive Greek language characters, may I replace --in the <HTML> Signup-- this piece of

Code: Select all

/^[A-Za-z0-9_!@$.' &]{1,50}$/
with a code that receives Greek language characters?

Thank you.

Re: Changes in <HTML> Signup

Posted: Mon Nov 20, 2017 8:45 am
by Pablo
Yes, you can replace this code with your own regular expression.
However be aware for security risks. If you allow more characters then the script may become vulnerable for 'code injection'.

Re: Changes in <HTML> Signup

Posted: Mon Nov 20, 2017 8:50 am
by Aris
Thank you, Pablo.

I will find the regular expression, and I will ask you again.

Re: Changes in <HTML> Signup

Posted: Mon Nov 20, 2017 8:41 pm
by Aris
Hi again.

I found --for Greek language characters-- the following regular expression:

Code: Select all

/^[\x{37E}-\x{3CF}-9_!@$.' &]{1,30}$/u

In my opinion it is good to maintain the second part

Code: Select all

-9_!@$.' &]{1,30}$
as in <HTML> Signup.
Also, I added the u at the end, for Unicode.

In the Form > Settings > General > Accept charset I must choose UTF-8 or I must let it blank?
I ask this question, because in the preceding code u indicates the Unicode.

Thank you.

Re: Changes in <HTML> Signup

Posted: Mon Nov 20, 2017 9:32 pm
by Pablo
I think you will need to set it to UTF-8

Re: Changes in <HTML> Signup

Posted: Tue Nov 21, 2017 4:27 am
by Aris
Thank you, Pablo.