1
0
Fork 0
mirror of synced 2024-06-28 19:20:25 +12:00

Use strip_tags to remove <p> tag

This commit is contained in:
Khushboo Verma 2024-01-11 18:54:08 +05:30
parent dc0b0c8ab7
commit d922feb4c7
2 changed files with 4 additions and 3 deletions

View file

@ -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([

View file

@ -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');
}