Standard-Conformity break when Menuitem-Ids not filtered

DaHarry - May 28, 2009 - 16:02
Project:YUI Menu
Version:6.x-1.1-1
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:patch (to be ported)
Description

In yuimenu.module file ($Id: yuimenu.module,v 1.5.2.5 2008/11/20 17:23:55 bakyildiz Exp $)
at sections where markup will be generated example: Generate html code for stript style menu.

on line 316

is something like

$output .= '<div id="'.replaceSGMLErrorIndicators($arrIndicatorList, $menu_item['link']['title']).'" class="yuimenu">
                     <div class="bd">
                     <ul>'."\n";

instead of
$output .= '<div id="'.$menu_item['link']['title'].'" class="yuimenu">
                     <div class="bd">
                     <ul>'."\n";

necessary.

// the code could be something like this (not tested):
static function replaceSGMLErrorIndicators($arrIndicatorList, $item){
$arrIndicatorList = array("&"," ","/"); //for performance reasons only the most important ones
for($i=0;sizeof($arrIndicatorList);$i++ ) $item = str_replace($arrIndicatorList[$i], "", $item);
  return "_".$item;  //the first letter has to be a char
}

 
 

Drupal is a registered trademark of Dries Buytaert.