Permalink
Browse files

Unnecessary str_replace

Signed-off-by: Mark Story <mark@mark-story.com>
  • Loading branch information...
1 parent a0c08cd commit 41d285234f1385d5ecb2ce84a6132c697f174b63 @maurymmarques maurymmarques committed with markstory Jun 24, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 cake/libs/sanitize.php
View
@@ -249,7 +249,7 @@ function clean($data, $options = array()) {
return $data;
} else {
if ($options['odd_spaces']) {
- $data = str_replace(chr(0xCA), '', str_replace(' ', ' ', $data));
+ $data = str_replace(chr(0xCA), '', $data);
}
if ($options['encode']) {
$data = Sanitize::html($data, array('remove' => $options['remove_html']));
@@ -260,7 +260,6 @@ function clean($data, $options = array()) {
if ($options['carriage']) {
$data = str_replace("\r", "", $data);
}
-
if ($options['unicode']) {
$data = preg_replace("/&amp;#([0-9]+);/s", "&#\\1;", $data);
}

0 comments on commit 41d2852

Please sign in to comment.