It appears Wayfinder 2.0 doesn’t escape HTML characters in the menu text -- so for example if someone decided to call a menu option
R&D
it appears just as that in the HTML source, and so fails to validate. It should appear as
R&D
The simplest change to the code would appear to be to change line 181 of the include from:
$phArray = array($useSub,$useClass,$classNames,$resource['link'],$resource['title'],$resource['linktext'],$useId,$resource['link_attributes'],$resource['id'],$resource['introtext'],$resource['description'],$numChildren);
to:
$phArray = array($useSub,$useClass,$classNames,$resource['link'],$resource['title'],htmlentities($resource['linktext']),$useId,$resource['link_attributes'],$resource['id'],$resource['introtext'],$resource['description'],$numChildren);
e.g. add htmlentities() around the link text.
Could this be incorporated into the code?