]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check for string
authorLukas Reschke <lukas@statuscode.ch>
Mon, 11 Jun 2012 16:12:46 +0000 (18:12 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Mon, 11 Jun 2012 16:12:46 +0000 (18:12 +0200)
lib/template.php

index 35b941794b78a694630b59ec9ff261c305049e69..688199a878cbcd7f1374f9566a2e30f0f28104c2 100644 (file)
@@ -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;
+        }
     }
 
        /**