We removed the DIV's around the $matches variable:

$matches[$row['title']] = '

'. $row['rendered'] . '

';

changed to:

$matches[$row['title']] = $row['rendered'];

and no longer get the HTML Error 0 (shows an error popup with badly formatted autocomplete results) in at least Chrome Frame, Firefox 3.5 and Safari 4.0.

I've attached a patch file with the suggested change. I've not been able to find anywhere that indicates why the $match values are wrapped in DIVs.

CommentFileSizeAuthor
userref-JSON-removeDIVS.patch594 byteswhayes