From 6d68b7620cd38fda23d2d5dec73a80818035c38d Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Mon, 11 Jun 2012 18:12:46 +0200 Subject: [PATCH] Check for string --- lib/template.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/template.php b/lib/template.php index 35b941794b..688199a878 100644 --- a/lib/template.php +++ b/lib/template.php @@ -280,28 +280,16 @@ class OC_Template{ } -/* public function assign( $key, $value, $sanitizeHTML = true ){ - if(is_array($value) && $sanitizeHTML == true) { - array_walk_recursive($value,'OC_Template::sanitizeHTML'); - $this->vars[$key] = $value; - return true; - } - if($sanitizeHTML == true) { - $this->vars[$key] = htmlentities($value, ENT_QUOTES); - return true; - } - $this->vars[$key] = $value; - return true; - }*/ - /** * @brief Internaly used to sanitze HTML * * This function is internally used to sanitize HTML. */ private static function sanitizeHTML( &$value ){ + if(is_string($value)) { $value = htmlentities( $value, ENT_QUOTES ); return $value; + } } /**