there are many reason for it, and almost none against it
so yes, i would advice you to do so

sanitizing is not neccessary if you make sure all your view outputs
are specialchared with
h()
like
echo h($data[Model][title]);
html-helper functions like §html->link() do that for you right away
anyway

this way you wont run in any of your current problems

mark


On 4 Aug., 01:07, Ponch316 <ponch...@gmail.com> wrote:
> I didn't set the encoding for UTF8. Should I? Are there any other
> encoding related specifications I should follow?
>
> Thanks.
>
> On Aug 2, 1:41 am, "euromark (munich)" <dereurom...@googlemail.com>
> wrote:
>
> > just dont sanitize them in the first place
> > the problem must be caused by something else
> > usually cake escapes them automatically
>
> > is everything UTF-8? especially the db? (careful: utf8 not uft-8
> > here!)
>
> > On 2 Aug., 03:34, Ponch316 <ponch...@gmail.com> wrote:
>
> > > Hi,
>
> > > I'm new to CakePHP and I came across a little problem.
>
> > > I created a scaffold to upload a list of schools to my database and
> > > after uploading about 400, I noticed that some of the schools were
> > > disappearing both from the scaffold view and the database. Since no
> > > one else has access to my system, I realized that the only possible
> > > reason for that is that some characters I entered, like apostrophes
> > > ('), hyphens (-), and commas (,), caused trouble in the database
> > > somehow.
>
> > > I created a new scaffold using Bake and decided use Sanitize::clean()
> > > before saving. So far, schools are no longer disappearing, but when I
> > > try to edit one of these, the characters are NOT displayed correctly
> > > in the text boxes (e.g: O&#039;Malley). I tried using the PHP method
> > > htmlspecialchars_decode() (http://us.php.net/htmlspecialchars_decode)
> > > before sending $this->data to the view but it didn't work, characters
> > > are still showing up like that.
>
> > > I was wondering if someone could help me to solve this problem. I
> > > don't know if I'm doing something wrong, cuz I'm very surprised that
> > > Cake has problems handling special characters, since a lot of last
> > > names use apostrophes. If you think I should use a different approach,
> > > please let me know as well.
>
> > > Thanks in advance.
> > > Ponch316
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to