Adding fix for #2881, Sanitize::escape() problem with trim()

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5418 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-07-09 04:32:04 +00:00
parent 7e499f1f14
commit a1019dfad3

View file

@ -72,7 +72,8 @@ class Sanitize{
*/
function escape($string, $connection = 'default') {
$db = ConnectionManager::getDataSource($connection);
$value = trim($db->value($string), '\'');
$value = substr($db->value($string), 1);
$value = substr($value, 0, -1);
return $value;
}
/**