diff options
author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-01-03 15:51:24 +0000 |
---|---|---|
committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-01-03 15:51:24 +0000 |
commit | 399abbc3a754cf5fdcfdff113446e1bc264091e2 (patch) | |
tree | 592188568e15325d59e51bf19cfdf667fae8d86d /system/helpers/security.php | |
parent | 925a6a2220760cb7daacee1ab80a07b61b3a30a1 (diff) | |
parent | 64e5efd57ba1479179c202e1b76b6eeb42d2924c (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'system/helpers/security.php')
-rw-r--r-- | system/helpers/security.php | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/system/helpers/security.php b/system/helpers/security.php index cd48d2e0..33e5118e 100644 --- a/system/helpers/security.php +++ b/system/helpers/security.php @@ -2,12 +2,12 @@ /** * Security helper class. * - * $Id: security.php 3769 2008-12-15 00:48:56Z zombor $ + * $Id: security.php 4698 2009-12-08 18:39:33Z isaiah $ * * @package Core * @author Kohana Team - * @copyright (c) 2007-2008 Kohana Team - * @license http://kohanaphp.com/license.html + * @copyright (c) 2007-2009 Kohana Team + * @license http://kohanaphp.com/license */ class security_Core { @@ -15,11 +15,12 @@ class security_Core { * Sanitize a string with the xss_clean method. * * @param string string to sanitize + * @param string xss_clean method to use ('htmlpurifier' or defaults to built-in method) * @return string */ - public static function xss_clean($str) + public static function xss_clean($str, $tool = NULL) { - return Input::instance()->xss_clean($str); + return Input::instance()->xss_clean($str, $tool); } /** @@ -33,15 +34,4 @@ class security_Core { return preg_replace('#<img\s.*?(?:src\s*=\s*["\']?([^"\'<>\s]*)["\']?[^>]*)?>#is', '$1', $str); } - /** - * Remove PHP tags from a string. - * - * @param string string to sanitize - * @return string - */ - public static function encode_php_tags($str) - { - return str_replace(array('<?', '?>'), array('<?', '?>'), $str); - } - } // End security
\ No newline at end of file |