Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.265.2.2
diff -u -r1.265.2.2 form.inc
--- includes/form.inc 7 Feb 2008 18:53:37 -0000 1.265.2.2
+++ includes/form.inc 8 Feb 2008 07:17:40 -0000
@@ -2154,11 +2154,22 @@
if (!empty($element['#title'])) {
$title = $element['#title'];
+
+ // Append a colon to the end of a title only if $punctuations aren't found.
+ $punctuations = array('.', '!', '?');
+ if (!in_array(substr($title, strlen($title) - 1), $punctuations)) {
+ $terminal = ':';
+ }
+ else {
+ $terminal = '';
+ }
+
+ $label = $t('!title!terminal !required', array('!title' => filter_xss_admin($title), '!terminal' => $terminal, '!required' => $required));
if (!empty($element['#id'])) {
- $output .= ' \n";
+ $output .= ' \n";
}
else {
- $output .= ' \n";
+ $output .= ' \n";
}
}