Re: Sanitize & html helper double converting htmlentities

2007-07-12 Thread Lloyd
This seems to be a real problem with me as well. I sanitize my array: $mrClean = new Sanitize(); $mrClean->cleanArray($this->data); It saves the phrase --> i'm here as i'm here into my database which is fine. But then when I use my helper to show a form->input() it returns: i'm here (that is

Re: Sanitize & html helper double converting htmlentities

2007-06-26 Thread Jonathan Langevin
glad to hear you're closer to the answer, keep us updated :-) On 6/26/07, mac joost <[EMAIL PROTECTED]> wrote: > > > Hi Jonathan, > > Thanks for the replies and getting me in a direction. > > Setting the "value" key in $html->input() doesn't work. The > htmlentities conversion, using the Cake h()

Re: Sanitize & html helper double converting htmlentities

2007-06-26 Thread mac joost
Hi Jonathan, Thanks for the replies and getting me in a direction. Setting the "value" key in $html->input() doesn't work. The htmlentities conversion, using the Cake h() function, is done way furtheron ($html->input() calls _parseAttributes() in which calls __formatAttribute()). What I did fin

Re: Sanitize & html helper double converting htmlentities

2007-06-26 Thread Jonathan Langevin
BTW, to further explain, when tagValue is called, that is when htmlentities is executed. FYI :-) On 6/26/07, Jonathan Langevin <[EMAIL PROTECTED]> wrote: > > ~line 406 of html.php (html helper, cake 1.1) > > if (!isset($htmlAttributes['value'])) { > $htmlAttributes['value'] = $

Re: Sanitize & html helper double converting htmlentities

2007-06-26 Thread Jonathan Langevin
~line 406 of html.php (html helper, cake 1.1) if (!isset($htmlAttributes['value'])) { $htmlAttributes['value'] = $this->tagValue($fieldName); } looks like if you do the following, you'll avoid the htmlentities: echo $html->input($modelName."/". > > $key, array("class"

Re: Sanitize & html helper double converting htmlentities

2007-06-26 Thread mac joost
Thanks for the reply. I'm mainly using Cake 1.1. I need to change my templates to use Cake 1.2 and will maybe do this later this week. As for the code, it's quite straight forward: I have a classifieds_controller which adds a classified add to the database: /* part of function save() */ if(isset

Re: Sanitize & html helper double converting htmlentities

2007-06-26 Thread Jonathan Langevin
Can you give us snippets of your code, so we can see how you're using sanitize and html helper? Are you using Cake 1.2? BTW, sanitize doesn't use htmlentities, it uses a specific REGEX match, appears it functions similar to htmlentities (just fyi :-) ) On 6/26/07, mac joost <[EMAIL PROTECTED]> wr

Sanitize & html helper double converting htmlentities

2007-06-26 Thread mac joost
Hi, When I use Sanitize to clean user-input and then create a form using the html helper, 'special characters' like '&' get double converted: - Sanitize converts '&' into '&', which is then stored in the database. - html helper functions convert '&' into '&'. I would like to use both these f