calibre has switched to an html 5 based parsing algorithm.As per that algorithm, that is the way that the particular markup you use is supposed to be parsed, each <a name="whatever" /> tag becomes two tags after parsing, leading to the duplicates. Open your html file ina modern browser and you will see the same thing if you use the "Inspect element" functionality, the <a> tag will have become two <a> tags.
If you change the self closing tag to an explicitly closed tag the problem with probably go away.
Change <a name="" /> to <a name=""></a>
|