コード例 #1
0
ファイル: View.php プロジェクト: groucho75/phmisk
 /**
  * Set the value of a var
  * 
  * @param str   	the var name, or array of vars
  * @param str|bol  	the var value, or apply the xss_clean filter
  * @param bol   	apply the xss_clean filter
  */
 public function assign($first, $second = FALSE, $third = FALSE)
 {
     if (is_array($first)) {
         if ($second) {
             $first = array_map_recursive('xss_safe', $first);
         }
         $this->vars = $first + $this->vars;
     } else {
         if ($third) {
             $second = xss_safe($second);
         }
         $this->vars[$first] = $second;
     }
 }
コード例 #2
0
ファイル: functions.php プロジェクト: sachintaware/phpsec
/**
 * This one replaces NewLines with <br/>
 * @see echo
 * @param unknown $data
 */
function echo_br($data)
{
    echo nl2br(xss_safe($data));
}
コード例 #3
0
ファイル: helpers.php プロジェクト: groucho75/phmisk
 function safe_echo($data)
 {
     echo xss_safe($data);
 }