I want to use an <a>
inside a flashMessenger message.
For example:
In my website I have some blog posts, and when I delete one of them, I want to show a message like:
"Success! <a>Undo</a>
"
My code:
$restore = $this->url()->fromRoute('news/restore', array('id' => $id));
$this->flashMessenger()->addSuccessMessage("Success. <a href='$restore'>Undo</a>");
return $this->redirect()->toRoute('news');
But It doesn't work when I put that <a>
inside the message.
How can I do that?