Index: common.inc
===================================================================
--- common.inc	(revision 14)
+++ common.inc	(working copy)
@@ -1443,14 +1443,18 @@
       $options['attributes']['class'] = 'active';
     }
   }
-
+  
+  // allow '#' as a valid link href, otherwise check the url
+  if ($path != '#') {
+	  $path = check_url(url($path, $options));
+  }
   // Remove all HTML and PHP tags from a tooltip. For best performance, we act only
   // if a quick strpos() pre-check gave a suspicion (because strip_tags() is expensive).
   if (isset($options['attributes']['title']) && strpos($options['attributes']['title'], '<') !== FALSE) {
     $options['attributes']['title'] = strip_tags($options['attributes']['title']);
   }
 
-  return '<a href="'. check_url(url($path, $options)) .'"'. drupal_attributes($options['attributes']) .'>'. ($options['html'] ? $text : check_plain($text)) .'</a>';
+  return '<a href="'. $path .'"'. drupal_attributes($options['attributes']) .'>'. ($options['html'] ? $text : check_plain($text)) .'</a>';
 }
 
 /**
