Fix DTD tests

Make sure strings like “&amp;nbsp;” survive roundtrip conversion by
leaving “&amp;” unchanging when decoding it will result in a new entity.