Revert "fixed to not modify TOC links (href=#...) anymore."

This reverts commit c4ef788c76d4afad998ca7de918a1be7243704f6.
Revert "fixed to not include 'file://' URLs in TOC."

This reverts commit 9d5269a88849e1332ae8bd901f5a00147f33603c.
removed useless commits.