diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 828960b3a2..5154c6f404 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -3121,8 +3121,9 @@ App::post('/v1/account/verification/phone') $messageContent ->setParam('{{project}}', $project->getAttribute('name')) ->setParam('{{secret}}', $secret); + $messageContent = \strip_tags($messageContent->render()); - $message = $message->setParam('{{token}}', $messageContent->render(true, Template::FILTER_ESCAPE)); + $message = $message->setParam('{{token}}', $messageContent); $message = $message->render(); $messageDoc = new Document([ diff --git a/src/Appwrite/Template/Template.php b/src/Appwrite/Template/Template.php index 70d9806df5..b584990e01 100644 --- a/src/Appwrite/Template/Template.php +++ b/src/Appwrite/Template/Template.php @@ -63,7 +63,7 @@ class Template extends View * * @throws Exception */ - public function render($minify = true, string $filter = self::FILTER_NL2P): string + public function render($minify = true): string { if ($this->rendered) { // Don't render any template return ''; @@ -72,7 +72,7 @@ class Template extends View if (\is_readable($this->path)) { $template = \file_get_contents($this->path); // Include template file } elseif (!empty($this->content)) { - $template = $this->print($this->content, $filter); + $template = $this->print($this->content); } else { throw new Exception('"' . $this->path . '" template is not readable or not found'); }