escape special HTML characters to entities in toc view. (closes #343)