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 find there is the "escape" key!
Setting "escape"=>false in the attribute array of $html->input() does
the trick!
The only problem left is that a "\" will get double-escaped (Sanitize
wil escape it, after which de DBO also escapes it.
On Jun 26, 5:13 pm, "Jonathan Langevin" <[EMAIL PROTECTED]> wrote:
> 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'] = $this->tagValue($fieldName);
> > }
>
> > looks like if you do the following, you'll avoid the htmlentities:
> > echo $html->input($modelName."/".
>
> > > $key, array("class"=>"text","value"=>"HTML HERE"), true);
>
> > On 6/26/07, mac joost <[EMAIL PROTECTED]> wrote:
>
> > > 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($this->params['data'])) {
> > > if($this->Classified->validates($this->params['data'])) {
> > > uses('sanitize');
> > > $Sanitize = & new Sanitize();
> > > $Sanitize->cleanArray($this->data['Classified']);
> > > $this->Classified->save($this->data);
> > > }
> > > }
>
> > > For my form (I use my manager plugin) the code is just:
> > > echo $html->input($modelName."/".$key, array("class"=>"text"), true);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---