Closed (fixed)
Project:
YUI Menu
Version:
5.x-2.3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Nov 2007 at 01:16 UTC
Updated:
8 Dec 2007 at 12:41 UTC
Drupal allows spaces when setting title for menu items; the YUI Menu module's way of generating id values for the div holding each drop-down menu doesn't seem to account for this at present and results in id values with spaces, which isn't allowed under XHTML standards:
line 236 in yuimenu.module:
$output .= '<div id="'. rep_char($menu['visible'][$mid]['title']).'" class="yuimenu">
This is my admittedly janky way of fixing this:
$output .= '<div id="'.str_replace (" ", "", rep_char($menu['visible'][$mid]['title'])).'" class="yuimenu">
No doubt there's a cleaner way which can account for these and other special chars allowed by Drupal but not allowed by W3C standards. Apologies as I am not a dev by trade! :)
Comments
Comment #1
bakyildiz commentedyour advise is applied. Thank you.
Comment #2
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.