[eluser]simonspoken[/eluser]
I'm trying to override the disallowed characters error:
From Router.php
Code:
function _filter_uri($str)
{
if ($this->config->item('permitted_uri_chars') != '')
{
if ( ! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", $str))
{
exit('The URI you submitted has disallowed characters.');
}
}
return $str;
}
I'd like to be able to strip out the disallowed characters, and then redirect to the valid URI (so - replace exit() with something). I'm terrible with regex, which has led me here.
Can anyone help?