fix bug in toc generation - escaped chars not linked right