- Patch #52448 by Zen: simplified drupal_attributes.

4.7.x
Dries Buytaert 2006-03-07 14:57:05 +00:00
parent bbca6b4828
commit b8d81c6a79
1 changed files with 3 additions and 3 deletions

View File

@ -983,11 +983,11 @@ function url($path = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE) {
*/
function drupal_attributes($attributes = array()) {
if (is_array($attributes)) {
$t = array();
$t = '';
foreach ($attributes as $key => $value) {
$t[] = $key .'="'. check_plain($value) .'"';
$t .= " $key=".'"'. check_plain($value) .'"';
}
return ' '. implode(' ', $t);
return $t;
}
}