Sanitize::html does not call stripWhitespace().

Sanitize::html replaces special characters with html escaped
characters, but I believe it leaves \n alone since the backslash does
not need escaping in html.

I am able to sanitize my data while retaining the new line character.
The only problem I've had is that the SQL cleaner adds an extra
backslash but otherwise it works fine for me.

$this->data['Document']['comments'] = $this->cleaner->html( $this->data
['Document']['comments'], true );
$this->data = $this->cleaner->clean( $this->data );
$this->data['Document']['comments'] = str_replace("\\n","<br/>",$this-
>data['Document']['comments']);

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to