Great problem and many items to modify

You use
htmlentities without encoding parm
It's not need usually, only in popus and frames, where function don't know prefered encoding. Ok, I'll do it by myself, but it would be great if in future releases You add enoding parms (third parm in
htmlentities function)
it's something about :
$item['description'] = htmlentities($item['description'], ENT_COMPAT, "$stylevar[charset]" );