Fix entity escaping in toc and headings