Hi,
Just asking myself if it's the right way to go, when using Flash\Session::setAutoescape(false)
and redirect after, message is escaped :
$this->flashSession->setAutoescape(false)->warning(
sprintf("Vous avez déjà un compte. <br><a href='%s'>Réinitialiser mon mot de passe</a>",
$this->di->getUrl()->get('session/reinitialiser')
)
);
$this->response->redirect('inscription');
I think it's normal because by default, autoescape is set to true, so when redirect happen, autoescape
take true
again.
So I explicit set to false
by default when defining it :
$container->set('flashSession', function () {
$f = (new FlashSession())
->setImplicitFlush(true)
->setAutoescape(false)
->setCssClasses([
'error' => 'message is-danger',
'success' => 'message is-success',
'notice' => 'message is-info',
'warning' => 'message is-warning',
]);
return $f;
});
Maybe bad practice for security or something else ?
Regards,