fix  #747267 by causing the closing regex to require a space, or some other non-word character
fix the links to reassigned packages in the html entries
handle undefined headers by just returning ''
eliminate convert to utf8 warning