Source for file security_functions.php
Documentation is available at security_functions.php
* An open source application development framework for PHP 4.3.2 or newer
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2006, EllisLab, Inc.
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
// ------------------------------------------------------------------------
* CodeIgniter Security Helpers
* @author ExpressionEngine Dev Team
* @link http://codeigniter.com/user_guide/helpers/security_helper.html
// ------------------------------------------------------------------------
* @param string the character set of your data
function xss_clean($str, $charset =
'ISO-8859-1')
trigger_error('Función xss_clean() no implementada.', E_USER_ERROR);
return $CI->input->xss_clean($str, $charset);
// --------------------------------------------------------------------
function dohash($str, $type =
'sha1')
require_once(BASEPATH.
'libraries/Sha1'.
EXT);
return $SH->generate($str);
return bin2hex(mhash(MHASH_SHA1, $str));
// ------------------------------------------------------------------------
$str =
preg_replace("#<img\s+.*?src\s*=\s*[\"'](.+?)[\"'].*?\>#", "\\1", $str);
$str =
preg_replace("#<img\s+.*?src\s*=\s*(.+?).*?\>#", "\\1", $str);
// ------------------------------------------------------------------------
* Convert PHP tags to entities
return str_replace(array('<?php', '<?PHP', '<?', '?>'), array('<?php', '<?PHP', '<?', '?>'), $str);
Documentation generated on Tue, 22 Nov 2011 13:28:59 -0200 by phpDocumentor 1.4.3