[eluser]TheFuzzy0ne[/eluser]
./system/application/libraries/MY_URI.php
Code:
<?php
class MY_URI extends CI_URI {
function _filter_uri($str)
{
if ($str != '' && $this->config->item('permitted_uri_chars') != '' && $this->config->item('enable_query_strings') == FALSE)
{
if ( ! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", $str))
{
$this->show_disallowed_uri_page();
exit();
}
}
// Convert programatic characters to entities
$bad = array('$', '(', ')', '(', ')');
$good = array('$', '(', ')', '(', ')');
return str_replace($bad, $good, $str);
}
function show_disallowed_uri_page()
{
?>
<html>
<head>
<title>Bad URI</title>
<link rel="stylesheet" href="/some/stylesheet.css" />
</head>
<body>
The URI you submitted contains disallowed characters.
</body>
</html>
<?php
}
}
// End of file: MY_URI.php
// Location: ./system/application/libraries/MY_URI.php
The above code is
untested, but should work.