CakePHP 1.2.5 HTML Code in Form Fields

2010-01-14 Thread Dewald Pretorius
Hope someone can help me with this issue. When I enter HTML code in a
text or textarea field and submit, the HTML code is somewhere
automatically stripped out by CakePHP.

At the very top of my controller function (just after !empty($this-
data) and before any validation or my own cleanup is done), I echo
$this-data['Model']['field'] as well as $_POST['data']['Model']
['field'].

The HTML code that I entered on the form is in the $_POST array, but
it is absent in the $this-data array.

Any ideas?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP 1.2.5 HTML Code in Form Fields

2010-01-14 Thread Dewald Pretorius
Never mind. I had any over-rigorous form data cleanup in the
before_filter of my app_controller.php.

On Jan 14, 11:25 pm, Dewald Pretorius dpr...@gmail.com wrote:
 Hope someone can help me with this issue. When I enter HTML code in a
 text or textarea field and submit, the HTML code is somewhere
 automatically stripped out by CakePHP.

 At the very top of my controller function (just after !empty($this-
 data) and before any validation or my own cleanup is done), I echo
 $this-data['Model']['field'] as well as $_POST['data']['Model']
 ['field'].

 The HTML code that I entered on the form is in the $_POST array, but
 it is absent in the $this-data array.

 Any ideas?
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Strange Bug in 1.2 Framework

2009-10-09 Thread Dewald Pretorius

Given the following scenario:

a) In an app controller method you do a header redirect to an external
site (I did it directly with header() not with $this-redirect).

b) Since there's no view output, no ctp file exists.

c) The controller method is named somemethod(), not __somemethod().

When Configure Debug  0, the redirect works fine.

When Configure Debug = 0, the output of default.ctp is built and sent
to the browser up to the very first line that calls a helper, and
there everything terminates. The user sees an empty page or partial
build of default.ctp, and the header redirect never happens.

The work-around is to create an empty somemethod.ctp with just ?php ?
 in it. Then the redirect works fine.

Dewald

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---