diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-06-25 20:19:13 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-06-25 20:19:13 +0000 |
commit | eace4a9d9b24d3fdbe5922eb33b73befce811cfb (patch) | |
tree | 9e02553b919aa7e28ac90402a775abd460c36d6e | |
parent | 7b77b90c03f1d2a7c8aa4531c8c3e916348770ce (diff) | |
download | brdo-eace4a9d9b24d3fdbe5922eb33b73befce811cfb.tar.gz brdo-eace4a9d9b24d3fdbe5922eb33b73befce811cfb.tar.bz2 |
- Patch #624086 by limikael, Dmitriy.trt: custom accept-charset for forms.
-rw-r--r-- | includes/form.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc index a115bf09b..5ce1c6568 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -3017,7 +3017,12 @@ function theme_form($variables) { $element = $variables['element']; // Anonymous div to satisfy XHTML compliance. $action = $element['#action'] ? 'action="' . check_url($element['#action']) . '" ' : ''; - return '<form ' . $action . ' accept-charset="UTF-8" method="' . $element['#method'] . '" id="' . $element['#id'] . '"' . drupal_attributes($element['#attributes']) . ">\n<div>" . $element['#children'] . "\n</div></form>\n"; + + if (empty($element['#attributes']['accept-charset'])) { + $element['#attributes']['accept-charset'] = "UTF-8"; + } + + return '<form '. $action .' method="'. $element['#method'] .'" id="'. $element['#id'] .'"'. drupal_attributes($element['#attributes']) .">\n<div>". $element['#children'] ."\n</div></form>\n"; } /** |