HTML to text conversion with links as footnotes