mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Use strip_tags to remove <p> tag
This commit is contained in:
@@ -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([
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user