Most of this patch just changes &amp;nbsp; to &amp;#160; which is just the same in html (not in xhmtl). The main part of the remaining has to do with the link
generation using the function style_submenu_element(): This function should generate links with all &amp;'s escaped as &amp;amp;'s, but it doesn't.
<p>
Wouldn't it be better to modify style_submenu_element() such that it escapes all &amp;'s to &amp;amp;? Then those (minor) html5 violations are fixed all at once.