diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2012-06-11 18:12:46 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2012-06-11 18:12:46 +0200 |
commit | 6d68b7620cd38fda23d2d5dec73a80818035c38d (patch) | |
tree | a449f09a5e9affd7b7407143a3a599971bd26b9b /lib/template.php | |
parent | 18e44ba2f38c67c43b64f0f753472407f30c98e0 (diff) | |
download | nextcloud-server-6d68b7620cd38fda23d2d5dec73a80818035c38d.tar.gz nextcloud-server-6d68b7620cd38fda23d2d5dec73a80818035c38d.zip |
Check for string
Diffstat (limited to 'lib/template.php')
-rw-r--r-- | lib/template.php | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/template.php b/lib/template.php index 35b941794b7..688199a878c 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; + } } /** |