cleaning up form class.

This commit is contained in:
Taylor Otwell 2011-07-03 12:55:23 -05:00
parent 4fe64b3a73
commit 1375ff98f2
1 changed files with 5 additions and 3 deletions

View File

@ -24,11 +24,13 @@ public static function open($action = null, $method = 'POST', $attributes = arra
$action = Request::uri();
}
$action = URL::to($action);
$attributes['action'] = HTML::entities($action);
$attributes['action'] = HTML::entities(URL::to($action));
$attributes['method'] = ($method == 'GET' or $method == 'POST') ? $method : 'POST';
// -------------------------------------------------------
// Set the default character set if it hasn't already been
// set in the attributes.
// -------------------------------------------------------
if ( ! array_key_exists('accept-charset', $attributes))
{
$attributes['accept-charset'] = Config::get('application.encoding');