The English and the German Wikipedia use the COinS microformat (see WP article) to embed citation metadata. It specifies a span with class="x" and a title-parameter for the data. Usually the span is empty, but that does not work with MediaWiki: Tidy removes them (when they have no id). There are some hacks, but all of them include a element displayed on the screen, which shows its (ugly) title when hovering about it.
I'm not sure how far a solution for this problem can go, but I propose tidy to let pass any empty element which has at least one attribute. If that is not desired, you may implement an exception matching exactly to this class attribute.