Hello Lorenzo,
I see many (not all) entries of my TOC in HTML as duplicated. The elements
are:
<span class="subsectionToc">1.1.1 <a href="#x1-260001"
id="QQ2-1-65">Undisclosed text</a></span>
<span class="subsectionToc"><a href="#Q1-1-66">1.1.1
Undisclosed text</a></span>
of course I don't see this in pdfLaTeX.
I'm working on a rather complex setting including some confidential
content, so I can't produce a MVE, but perhaps the id names mean something
to you and you can spot a known pathology and post some hints at how to
troubleshoot and fix the issue?
this is not expected, it will be probably caused by some package you
use. I think that you can construct a MWE by using your document
preamble and few dummy sections. We cannot tell much more without that.
Best regards,
Michal