Skip to content

Loading…

Removed unnecessary str_replace Sanitize class. #129

Closed
wants to merge 1 commit into from

2 participants

@maurymmarques

I'm not sure what the line should be doing. Please check and if my commit is wrong, disregard.

Also removed the space between ifs left by my previous commit.

Note: The same occurs on branch of CakePHP 2.0

Thank you.

@markstory
CakePHP member

Merged to 1.3 in 41d2852

@markstory markstory closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 24, 2011
  1. @maurymmarques

    Unnecessary str_replace

    maurymmarques committed
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 2 deletions.
  1. +1 −2 cake/libs/sanitize.php
View
3 cake/libs/sanitize.php
@@ -248,7 +248,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']));
@@ -259,7 +259,6 @@ function clean($data, $options = array()) {
if ($options['carriage']) {
$data = str_replace("\r", "", $data);
}
-
if ($options['unicode']) {
$data = preg_replace("/&#([0-9]+);/s", "&#\\1;", $data);
}
Something went wrong with that request. Please try again.