Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Trouble with clickable link inside Flash Message

HI, I have a trouble with putting clickable link inside Flash Message, it keep showing raw html tag inside message instead of render into html

Please verify your email, please <a href="#">click here</a> to resend verify link

"click here" should be clickable



80.3k
Accepted
answer

Try like this in your service file:

        // Flash messages
        $di->setShared('flash', function() {
            $flash = new \Phalcon\Flash\Session();
            $flash->setAutomaticHtml(false);
            $flash->setAutoescape(false); // This is important part
            return $flash;
        });

Thank you bro, you saved my day ^^

Try like this in your service file:

       // Flash messages
       $di->setShared('flash', function() {
           $flash = new \Phalcon\Flash\Session();
           $flash->setAutomaticHtml(false);
           $flash->setAutoescape(false); // This is important part
           return $flash;
       });