Commit 0641b184 authored by tbrehm's avatar tbrehm

Improved URL regex.

parent 61c77268
...@@ -112,7 +112,7 @@ $form["tabs"]['domain'] = array ( ...@@ -112,7 +112,7 @@ $form["tabs"]['domain'] = array (
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'TEXT', 'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'REGEX', 'validators' => array ( 0 => array ( 'type' => 'REGEX',
'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@', 'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
'errmsg'=> 'redirect_error_regex'), 'errmsg'=> 'redirect_error_regex'),
), ),
'default' => '', 'default' => '',
......
...@@ -224,7 +224,7 @@ $form["tabs"]['redirect'] = array ( ...@@ -224,7 +224,7 @@ $form["tabs"]['redirect'] = array (
'redirect_path' => array ( 'redirect_path' => array (
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'validators' => array ( 0 => array ( 'type' => 'REGEX', 'validators' => array ( 0 => array ( 'type' => 'REGEX',
'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@', 'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
'errmsg'=> 'redirect_error_regex'), 'errmsg'=> 'redirect_error_regex'),
), ),
'formtype' => 'TEXT', 'formtype' => 'TEXT',
......
...@@ -112,7 +112,7 @@ $form["tabs"]['domain'] = array ( ...@@ -112,7 +112,7 @@ $form["tabs"]['domain'] = array (
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'TEXT', 'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'REGEX', 'validators' => array ( 0 => array ( 'type' => 'REGEX',
'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@', 'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
'errmsg'=> 'redirect_error_regex'), 'errmsg'=> 'redirect_error_regex'),
), ),
'default' => '', 'default' => '',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment