This commit is contained in:
Julio Cesar Laura Avendaño
2018-07-20 00:28:45 +00:00
committed by Julio Cesar Laura Avendaño
parent a24e057b23
commit 548e953072
2 changed files with 31 additions and 0 deletions

View File

@@ -356,12 +356,26 @@ class InputFilter
* @param String $source
* @param Resource $connection - An open MySQL connection
* @return String $source
* @todo We need to review this method, because the sended string is unescaped
*/
public function escapeString($string, &$connection)
{
return mysqli_real_escape_string($connection, $string);
}
/**
* Escapes a string using a Propel connection
*
* @param string $string The string to escapes
* @param object $connection The connection object
*
* @return string
*/
public function escapeUsingConnection($string, $connection)
{
return mysqli_real_escape_string($connection->getResource(), $string);
}
/**
* Internal method removes tags/special characters
* @author Marcelo Cuiza