summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-12-05 10:35:08 +0100
committerAndrey Andreev <narf@devilix.net>2014-12-05 10:35:08 +0100
commitbc11439c5f7fbbb1ef0257f8083c375eeb9dd79c (patch)
treeaad47028ea3237e1744b5800438d52a9973fb7c6
parent87e2016258a6dd60d3fd322e0162c95038856850 (diff)
parent61a0aee144710228ea30afa672adf530623d35d5 (diff)
Merge pull request #3323 from Razican/remove-uri-filter
Remove conversion of 'programmatic characters' to HTML entities in CI_URI::filter_uri() Close #47
-rw-r--r--system/core/URI.php7
-rw-r--r--tests/codeigniter/core/URI_test.php2
2 files changed, 2 insertions, 7 deletions
diff --git a/system/core/URI.php b/system/core/URI.php
index 1817374b7..067338d2a 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -327,12 +327,7 @@ class CI_URI {
show_error('The URI you submitted has disallowed characters.', 400);
}
- // Convert programatic characters to entities and return
- return str_replace(
- array('$', '(', ')', '%28', '%29'), // Bad
- array('&#36;', '&#40;', '&#41;', '&#40;', '&#41;'), // Good
- $str
- );
+ return $str;
}
// --------------------------------------------------------------------
diff --git a/tests/codeigniter/core/URI_test.php b/tests/codeigniter/core/URI_test.php
index b05a385d6..4b1d644e3 100644
--- a/tests/codeigniter/core/URI_test.php
+++ b/tests/codeigniter/core/URI_test.php
@@ -138,7 +138,7 @@ class URI_test extends CI_TestCase {
$str = $this->uri->filter_uri('$destroy_app(foo)');
- $this->assertEquals($str, '&#36;destroy_app&#40;foo&#41;');
+ $this->assertEquals($str, '$destroy_app(foo)');
}
// --------------------------------------------------------------------