Update html and plain text tests
Prevent illegal dom structures in transformations