Permitted URI Characters

Hi, is there a reason Pages are only allowed alpha/dot/dash characters? There is a config setting for "permitted_uri_chars" but even if you add other characters to that list, Pages still only allows alpha/dot/dash.
'rules' => 'trim|required|alpha_dot_dash|max_length[250]|callback__check_slug'


function alpha_dot_dash($str)
{
return ( ! preg_match("/^([-a-z0-9_\-\.])+$/i", $str)) ? FALSE : TRUE;
}

Shouldn't pages respect the config setting?
Also, there is a bug in the Navigation plugin causing the regex to break if you have an "@" in your url. The output of current_url() is not escaped...
if (preg_match('@^'.current_url().'/?$@', $link['url'])

Thanks for your work.
You must sign in to comment.