/** * 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; } }
/** * This one replaces NewLines with <br/> * @see echo * @param unknown $data */ function echo_br($data) { echo nl2br(xss_safe($data)); }
function safe_echo($data) { echo xss_safe($data); }