diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2012-06-11 19:07:51 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2012-06-11 19:07:51 +0200 |
commit | 2b22c538c8cafafedb057947ff90abb5d219c903 (patch) | |
tree | 1082ac159bceb05207b36be26e0e4b53bcdf8bcb /lib/template.php | |
parent | 6d68b7620cd38fda23d2d5dec73a80818035c38d (diff) | |
download | nextcloud-server-2b22c538c8cafafedb057947ff90abb5d219c903.tar.gz nextcloud-server-2b22c538c8cafafedb057947ff90abb5d219c903.zip |
Make some apps compatible
Diffstat (limited to 'lib/template.php')
-rw-r--r-- | lib/template.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/template.php b/lib/template.php index 688199a878c..ba82b21774a 100644 --- a/lib/template.php +++ b/lib/template.php @@ -286,10 +286,8 @@ class OC_Template{ * This function is internally used to sanitize HTML. */ private static function sanitizeHTML( &$value ){ - if(is_string($value)) { - $value = htmlentities( $value, ENT_QUOTES ); - return $value; - } + $value = htmlentities( $value ); + return $value; } /** @@ -528,13 +526,13 @@ class OC_Template{ $_ = array_merge( $additionalparams, $this->vars ); } - // Einbinden + // Include ob_start(); include( $this->path.$file.'.php' ); $data = ob_get_contents(); @ob_end_clean(); - // Daten zurückgeben + // Return data return $data; } @@ -548,7 +546,7 @@ class OC_Template{ public static function printUserPage( $application, $name, $parameters = array() ){ $content = new OC_Template( $application, $name, "user" ); foreach( $parameters as $key => $value ){ - $content->assign( $key, $value ); + $content->assign( $key, $value, false ); } print $content->printPage(); } @@ -563,7 +561,7 @@ class OC_Template{ public static function printAdminPage( $application, $name, $parameters = array() ){ $content = new OC_Template( $application, $name, "admin" ); foreach( $parameters as $key => $value ){ - $content->assign( $key, $value ); + $content->assign( $key, $value, false ); } return $content->printPage(); } @@ -578,7 +576,7 @@ class OC_Template{ public static function printGuestPage( $application, $name, $parameters = array() ){ $content = new OC_Template( $application, $name, "guest" ); foreach( $parameters as $key => $value ){ - $content->assign( $key, $value ); + $content->assign( $key, $value,false ); } return $content->printPage(); } |