fix bug with footnotes containing multiple paragraphs in HTML