Re: Display unescaped html elements
How were they escaped? If the content has been run through
htmlspecialchars() before saving to the DB then:
echo htmlspecialchars_decode($data['Post']['body']);
On Sat, May 5, 2012 at 12:53 PM, Matteo Landi <matteo@matteolandi.net> wrote:
> On May/05, Matteo Landi wrote:
>> Hi everybody,
>>
>> Could you tell me what is the right way to display html formatted content
>> extracted from the database? Taking the blog tutorial as example, how is
>> possible to let users create posts containing html tags such as `strong`, `em`,
>> `ul` and so forth?
>>
>>
>> Thanks,
>> Matteo
>>
>> --
>> http://www.matteolandi.net
>
> Excuse me for double posting, but the previous message contained an incomplete
> subject.
>
>
> Cheers,
> Matteo
>
> --
> http://www.matteolandi.net
>
> --
> Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home