Use strip_tags to remove <p> tag
This commit is contained in:
parent
dc0b0c8ab7
commit
d922feb4c7
2 changed files with 4 additions and 3 deletions
|
@ -3121,8 +3121,9 @@ App::post('/v1/account/verification/phone')
|
||||||
$messageContent
|
$messageContent
|
||||||
->setParam('{{project}}', $project->getAttribute('name'))
|
->setParam('{{project}}', $project->getAttribute('name'))
|
||||||
->setParam('{{secret}}', $secret);
|
->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();
|
$message = $message->render();
|
||||||
|
|
||||||
$messageDoc = new Document([
|
$messageDoc = new Document([
|
||||||
|
|
|
@ -63,7 +63,7 @@ class Template extends View
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @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
|
if ($this->rendered) { // Don't render any template
|
||||||
return '';
|
return '';
|
||||||
|
@ -72,7 +72,7 @@ class Template extends View
|
||||||
if (\is_readable($this->path)) {
|
if (\is_readable($this->path)) {
|
||||||
$template = \file_get_contents($this->path); // Include template file
|
$template = \file_get_contents($this->path); // Include template file
|
||||||
} elseif (!empty($this->content)) {
|
} elseif (!empty($this->content)) {
|
||||||
$template = $this->print($this->content, $filter);
|
$template = $this->print($this->content);
|
||||||
} else {
|
} else {
|
||||||
throw new Exception('"' . $this->path . '" template is not readable or not found');
|
throw new Exception('"' . $this->path . '" template is not readable or not found');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue