Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.506
diff -u -r1.506 common.inc
--- includes/common.inc	13 Jan 2006 07:33:13 -0000	1.506
+++ includes/common.inc	13 Jan 2006 18:12:31 -0000
@@ -1027,7 +1027,8 @@
  *   an HTML string containing a link to the given path.
  */
 function l($text, $path, $attributes = array(), $query = NULL, $fragment = NULL, $absolute = FALSE, $html = FALSE) {
-  if ($path == $_GET['q']) {
+  // Make sure to compare the full path with parameters, but don't override $path or $query, they are sent to url() below
+  if (($path . (($query != '') ? '&' . $query : '')) == $_GET['q']) {
     if (isset($attributes['class'])) {
       $attributes['class'] .= ' active';
     }
