Merge branch 'maint/7.0'
[ninja.git] / application / helpers / security.php
blob156c459d3e7823633818cfdc8253f9409a35323e
1 <?php
2 defined('SYSPATH') or die('No direct access allowed.');
4 /**
5 * Add functionality to kohanas built-in security helper
6 */
7 class security {
8 /**
9 * Escape scring only if told to
11 public static function xss_clean($str) {
12 if (config::get_cgi_cfg_key('escape_html_tags')) {
13 return str_replace(html::specialchars('<br />'), '<br />', html::specialchars($str));
15 return $str;