If you have:
Code:
<p class="foo"><span class="bar">some text</p>
<p class="foo">some more text</p>
Then Tidy will go way overboard because of the unclosed <span> tag, and it will insert a <span> to every single paragraph after the first one, until the end of the html/xhtml file.
For example, Tidying a file with unclosed tags (e.g. a <span>), you'll get something like:
line 7 column 16 - Warning: missing </span> before </p>
line 9 column 16 - Warning: inserting implicit <span>
line 11 column 16 - Warning: inserting implicit <span>
so, yeah, be very careful about unclosed tags with Tidy, e.g. when doing a Replace All in Sigil.