From 1375ff98f218248e889d8613f7f1f5b7e2690648 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 3 Jul 2011 12:55:23 -0500 Subject: [PATCH] cleaning up form class. --- system/form.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/system/form.php b/system/form.php index 219d5d00..5d3c9d53 100644 --- a/system/form.php +++ b/system/form.php @@ -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');