OK, I found a bug in htdig/HTML.cc, which I think causes it to think the
"&amp;" isn't translated to "&", so it copies the whole entity through.
I'll see if I can find a sensible fix. Thanks for persisting.