Exemple #1
0
/**
 * @deprecated
 */
function nl2br2($string)
{
    return Tools14::nl2br($string);
}
Exemple #2
0
 /**
  * Sanitize data which will be injected into SQL query
  *
  * @param string $string SQL data which will be injected into SQL query
  * @param boolean $html_ok Does data contain HTML code ? (optional)
  * @return string Sanitized data
  */
 public function escape($string, $html_ok = false)
 {
     if (_PS_MAGIC_QUOTES_GPC_) {
         $string = stripslashes($string);
     }
     if (!is_numeric($string)) {
         $string = $this->_escape($string);
         if (!$html_ok) {
             $string = strip_tags(Tools14::nl2br($string));
         }
     }
     return $string;
 }