From 889088f72da5aa3ce10f2f6c43bb66d00f5a1423 Mon Sep 17 00:00:00 2001
From: Morris Jobke <hey@morrisjobke.de>
Date: Sat, 26 Jul 2014 00:04:49 +0200
Subject: [PATCH] Fix template rendering for 'blank' templates

---
 lib/public/appframework/http/templateresponse.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/public/appframework/http/templateresponse.php b/lib/public/appframework/http/templateresponse.php
index 02589f4e2a..c74d3b6025 100644
--- a/lib/public/appframework/http/templateresponse.php
+++ b/lib/public/appframework/http/templateresponse.php
@@ -134,8 +134,10 @@ class TemplateResponse extends Response {
 	 * @return string the rendered html
 	 */
 	public function render(){
+		// \OCP\Template needs an empty string instead of 'blank' for an unwrapped response
+		$renderAs = $this->renderAs === 'blank' ? '' : $this->renderAs;
 
-		$template = new \OCP\Template($this->appName, $this->templateName, $this->renderAs);
+		$template = new \OCP\Template($this->appName, $this->templateName, $renderAs);
 
 		foreach($this->params as $key => $value){
 			$template->assign($key, $value);
-- 
GitLab