commit 778a82dc1926e224d10f27ccdce645ac32f3ef4a
Author: James Wilson <jrwilson3@gmail.com>
Date:   Thu Aug 2 11:54:56 2012 -0400

    Issue #1710492 by jwilson3: Use drupal_clean_css_identifier() for menu-path class.

diff --git a/nice_menus.module b/nice_menus.module
index 743db51..eb7fe79 100644
--- a/nice_menus.module
+++ b/nice_menus.module
@@ -425,13 +425,9 @@ function theme_nice_menus_build($variables) {
       $first_class = $index == 1 ? ' first ' : '';
       $oddeven_class = $index % 2 == 0 ? ' even ' : ' odd ';
       $last_class = $index == $count ? ' last ' : '';
-      // Build class name based on menu path
-      // e.g. to give each menu item individual style.
-      // Strip funny symbols.
-      $clean_path = str_replace(array('http://', 'www', '<', '>', '&', '=', '?', ':', '.'), '', $menu_item['link']['href']);
-      // Convert slashes to dashes.
-      $clean_path = str_replace('/', '-', $clean_path);
-      $class = 'menu-path-' . $clean_path;
+      // Build class name based on menu path to allow styles per menu item.
+      $class =  str_replace(array('http', 'https', '://', 'www'), '', $menu_item['link']['href']);
+      $class = drupal_clean_css_identifier('menu-path-' . $class);
       if ($trail && in_array($mlid, $trail)) {
         $class .= ' active-trail';
       }
