Clean up attributes when transforming element to paragraph when stripping it.
Test for parent, because element could be removed.