But, as far as I understand Cake already handles Sanitize::SQL for
you. So you shouldn't need to do that again. That might be why you
think you're getting stuff back in an unreadable format, you're likely
sanitizing twice.

Brian

On Jan 30, 9:04 pm, brian_gaff <[EMAIL PROTECTED]> wrote:
> Maybe something like this:
>
> var $swaps = array('\n','\r','\\');
>
> function unSanitize($str)
> {
>   foreach($swaps in $item)
>   {
>     /* search for the item as \n or \r then put it in quotes for php
> to evaluate it and replace it back in */
>     $str = str_replace($item, "{$item}", $str);
>   }
>
> }
>
> Something like that might work. I haven't tested it, but it might get
> you started.
>
> Brian
>
> On Jan 29, 1:05 am, senseBOP <[EMAIL PROTECTED]> wrote:
>
> > Hey guys, hope I'm posting this in the right group and all...
>
> > Unless there's another way to go about this, shouldn't the Sanitize
> > class also include a method to un-escape sanitized data back into a
> > readable, user-friendly, format? Otherwise, what's the point of having
> > it sanitized?
>
> > I'm no big expert, and there's probably a way for me to un-escape data
> > from the database before displaying it back to the user, but so far, I
> > have failed to find such a way. And to me, it only makes sense that
> > the class that is responsible for re-formatting the data going into
> > the DB will also be responsible to format it back to readable form
> > once it is pulled from the DB.
>
> > BWhat's your take on this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to