From 3714827685aa14ba51fdbcc431fa421b27abd314 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 19 Jan 2004 21:57:42 +0000 Subject: - Fixed bug 5247: active link marking invalidates HTML. Patch by Goba. --- includes/common.inc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'includes/common.inc') diff --git a/includes/common.inc b/includes/common.inc index d2303bd31..2dab60263 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1037,7 +1037,15 @@ function drupal_attributes($attributes = NULL) { } function l($text, $url, $attributes = array(), $query = NULL, $fragment = NULL) { - return "$text"; + if ($url == $_GET['q']) { + if (isset($attributes['class'])) { + $attributes['class'] .= ' active'; + } + else { + $attributes['class'] = 'active'; + } + } + return "$text"; } function field_get($string, $name) { -- cgit v1.2.3