Html markup in cakephp's $html->link, eg. $html->link('<span>Hey</span>')? -
i have block of code in cakephp .ctp file:
<h1> <?php echo $this->html->link('hello <span>stack overflow</span>', array('controller'=>'pages', 'action'=>'home')); ?> </h1>
but instead of html being formatted, i'm seeing literally:
<h1><a href="/rrweb/www/hub/pages/home"> hello <span>stack overflow</span></a></h1>
any idea's?
thanks!
you need disable html entity conversion:
echo $this->html->link( 'hello <span>stack overflow</span>', array('controller'=>'pages', 'action'=>'home'), array('escape' => false) );
Comments
Post a Comment