Changeset 2239
- Timestamp:
- 03/08/2008 03:57:44 AM (10 months ago)
- Files:
-
- 1 modified
-
trunk/system/helpers/security.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/helpers/security.php
r1725 r2239 20 20 public static function xss_clean($str) 21 21 { 22 static $input; 23 24 if ($input === NULL) 25 { 26 $input = new Input(); 27 } 28 29 return $input->xss_clean($str); 22 return Input::instance()->xss_clean($str); 30 23 } 31 24 … … 38 31 public static function strip_image_tags($str) 39 32 { 40 $str = preg_replace('#<img\b.*?(?:src\s*=\s*["\']?([^"\'<>\s]*)["\']?[^>]*)?>#is', '$1', $str); 41 42 return trim($str); 33 return preg_replace('#<img\s.*?(?:src\s*=\s*["\']?([^"\'<>\s]*)["\']?[^>]*)?>#is', '$1', $str); 43 34 } 44 35 … … 51 42 public static function encode_php_tags($str) 52 43 { 53 return str_replace(array('<?', '?>'), array('<?', '?>'), $str);44 return str_replace(array('<?', '?>'), array('<?', '?>'), $str); 54 45 } 55 46
