2c2 < index 9b606e9fb1..56e93b0d16 100644 --- > index 9b606e9fb1..2c05721b6d 100644 5c5 < @@ -2274,25 +2274,39 @@ function theme_feed_icon($variables) { --- > @@ -2274,25 +2274,44 @@ function theme_feed_icon($variables) { 11c11 < + * The Drupal element. --- > + * The Drupal element, rendered in HTML. 18a19 > + // Set default values to avoid warning later. 26a28 > + // Build the tag attributes. 29c31,32 < + $output = '<' . $element['#tag'] . $attributes; --- > + // Build the tag prefix. > + $prefix = '<' . $element['#tag'] . $attributes; 31,38c34,43 < + if (!empty($element['#children']) || NULL !== $element['#value']) { < + $output .= '>'; < + < + $output .= $element['#value_prefix']; < + $output .= $element['#value'] . $element['#children']; < + $output .= $element['#value_suffix']; < + < + $output .= ' + // Build the tag content if any. > + $content = $element['#value_prefix'] . > + $element['#value'] . > + $element['#value_suffix'] . > + $element['#children']; > + > + // Detect if we should add a closing tag or not. > + if (!empty($element['#children']) || $element['#value'] !== NULL) { > + $prefix .= '>'; > + $suffix = ''; 51c56 < + $output .= '/'; --- > + $suffix = '/>'; 54c59 < + return $output . ">\n"; --- > + return $prefix . $content . $suffix . "\n";