I am using Code Ignitor for my site. The problem is in the same server the function htmlspecialchars_decode($str); is working but not when I use with CI.
This is my code in controller’s function:
$meta_d = $this->site_model->lyrics_meta_desc();
$data['meta_desc'] = htmlspecialchars_decode($meta_d);
And this in my view:
<meta name="description" content="<?php echo character_limiter($meta_desc, 150);?>" />
Is there anything I am missing. Or some thing else is to be done for CI. Please suggest.By the way I have loaded text helper for the use of character_limiter.
The given code works as it is intended.
However if you want to get readable text from the Html entities such as
I've wal. You need to callutf8_encode()afterhtmlspecialchars_decode().I would advice you to usehtml_entity_decode()as well , since it includes all html entities .so,