Thursday, October 29, 2009

Re: Odd code in sanitize core lib?

I am just guessing here but couldn't it be replacing "looks like an
exclamation but is really far out into outfer space" with a normal
exclamation?

Using a "bad" font and the code look different.


On Oct 29, 7:32 am, Miles J <mileswjohn...@gmail.com> wrote:
> I thought you were lying so I checked, and haha it is there. Im
> curious on this as well.
>
> On Oct 28, 8:51 pm, George H <acher...@gmail.com> wrote:
>
>
>
> > Hi guys,
>
> > I've been debugging my controller that is using Sanitize and I had a
> > peek inside the CakePHP Sanitize core lib file, where I found
> > something odd.
>
> > Is it possible if someone could explain to me (I'm just genuinely
> > curious) the reasoning behind line 223 in /cake/libs/sanitize.php
> > (version 1.2.5)?
>
> > $data = str_replace("'", "'", str_replace("!", "!", $data));
>
> > From what I can tell, this line is replacing ! chars with !, and then
> > replacing ' chars with '. I've done some checks and the search and
> > replace strings are exactly the same.
>
> > As I mentioned, I am genuinely curious (probably more curious if I am
> > lost my marbles or not and maybe I'm seeing things), so any core devs
> > out there please do not see this as a personal attack on you, or your
> > intelligence, or ability to cut good code, etc etc.
>
> > Cheers,
> > -- George
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: