#6042: correct outlining of encoding in the form tag
    Reporter:  euromark   |          Type:  Enhancement
      Status:  new        |      Priority:  Low        
   Milestone:  1.2.x.x    |     Component:  General    
     Version:  1.2 Final  |      Severity:  Normal     
    Keywords:             |   Php_version:  n/a        
Cake_version:             |  
 usually a form looks like this (even with App.encoding set to utf-8
 <form id="XForm" method="post" action="/x/add">

 this should be done automatically - especially as all UTF-8 forms (with
 Ajax Submitting or not) should have it declared as utf-8

 this enhancement inside the "form helper function" create() in
 /libs/view/helpers/form.php fixes this:
         function create($model = null, $options = array()) {
                 $defaultModel = null;
                 $view =& ClassRegistry::getObject('view');

                 if (is_array($model) && empty($options)) {
                         $options = $model;
                         $model = null;

                 /** CORE-HACK 2009-01-22 ms / correct form encoding */
                 $encoding = Configure::read('App.encoding');
                 if (!empty($encoding)) {
                         $options['accept-charset'] = low($encoding);
                 /** CORE-HACK 2009-01-22 end */

                 if (empty($model) && $model !== false &&
 !empty($this->params['models'])) {

 it now looks like this:
 <form accept-charset="utf-8" id="XForm" method="post" action="/x/add">

Ticket URL: <https://trac.cakephp.org/ticket/6042>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to