I want to be sure if this behavior is 100% supported in CodeIgniter.
What doubts me is that in config.php
the permitted_uri_chars
is as followed:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
It says that only English chars are allowed. BUT consider the results of following urls:
http://localhost/codeigniter/index.php/controller/method/hell0-there+++
Result: The URI you submitted has disallowed characters.
http://localhost/codeigniter/index.php/controller/method/hello-سلام
Result: No problem!!!
The word سلام
(which is in Persian and means "hello") cannot be accepted by the pattern 'a-z 0-9~%.:_\-'
, but it doesn't error like the previous example!
Why does this behavior happen?
Now the next question: Is there any NEED to add and include Persian characters in the pattern?
I was thinking of changing the config.php
to be like this:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
// Add all the persian characters after standard pattern:
$config['permitted_uri_chars'] .= 'آابپتثجچحخدذرزسشصضطظعغفقکگلمنوهیي۱۲۳۴۵۶۷۸۹۰';