Commit b8d81c6a authored by Dries's avatar Dries

- Patch #52448 by Zen: simplified drupal_attributes.

parent bbca6b48
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment