Saturday, August 27, 2011

Re: HTML ENTITIES

I am never going to use html. Then why should i increase database size?

On Sun, Aug 28, 2011 at 10:09 AM, Miles J <mileswjohnson@gmail.com> wrote:
So whats your reasoning for not wanting HTML in the database?

Not like it can really break anything.

On Aug 27, 2:31 pm, Ryan Schmidt <google-2...@ryandesign.com> wrote:
> On Aug 27, 2011, at 03:46, Prabha vathi wrote:
>
> > echo $html->link(
> >                 Sanitize::html($post_array['content'], array('remove' => true)),
> >                 array(
> >                     'controller' => 'posts',
> >                     'action' => 'view',
> >                     'id' => $post_array['id'],
> >                     'quotes' => $this->Link->makeSeoUrl(Sanitize::html($post_array['content'], array('remove' => true)))
> >                 ),
> >                 array('title' => substr(Sanitize::html($post_array['content'], array('remove' => true)),0,20)." ... Quotes of the day", 'class' => 'agrizlink')
> >             );
>
> > Now db has text like this - you're - but it is displayed like this - you&#039;re in view.
> > But if there is no link, then it is working correctly. What is the problem?
>
> Sanitize::html is escaping it once. Then $html->link is escaping it a second time.
>
> Tell $html->link not to escape it that second time by passing false in the $escapeTitle parameter.
>
> http://book.cakephp.org/view/1363/link
>
> Note, by the way, that "$html" is old CakePHP 1.2 syntax. For CakePHP 1.3, you want to use "$this->Html" instead.

--
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



--
--
Prabhavathi
http://www.indiapublicforum.com

--
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

No comments: