Hey, hoping to get some entities used in paths pretty commonly with void_menu module controlled links.

Original:
$clean_path = str_replace(array('http://', 'www', '<', '>', '&', '=', '?', ':', '.''), '', $menu_item['link']['href']);

Updated:
$clean_path = str_replace(array('http://', 'www', '<', '>', '&', '=', '?', ':', '.', ';', '(', ')', ' '), '', $menu_item['link']['href']);

This accounts for javascript methods executed from links. Ex:
javascript: myFunction('something');

Currently becomes an invalid class:
menu-path-javascript myFunction(something);

Thanks :)

Comments

xiukun.zhou’s picture

Category: task » bug
Status: Active » Fixed

hi WillHall. Thanks
This problem has been fixed in 7.x-2.x-dev See: http://drupal.org/node/1710492

use drupal_html_class

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.