Strip out MS Word html tags on migrate
Found a great way to do this automatically after comparing the Devel tab on a node before and after manually saving it. I realize this is a somewhat narrow use case, but I think it's pretty strong nonetheless.


Create a CKEditor profile (I called it "Bio Cleaner", machine name bio_cleaner) and limit it to the tags and attributes you want. In my case, it's &lt;a href hreflang&gt; &lt;ul type&gt; &lt;ol start type&gt; &lt;li&gt; &lt;br&gt; &lt;p&gt;.
For any "formatted" text field in your content types, add the new CKEditor profile as an allowed profile.
In your migration, rather than just dumping the raw contents into a field name, set it up like so:




(Sorry for the image - Stack Exchange apparently can't format yaml?)

Anyway, the secret sauce is to to set the /value key of the target field to the value pulled from the migration, and to set the /format key to the new format you created. Drupal will automagically clean up whatever tags aren't included in your profile when it saves the data.

NOTE: this relies on having the Allowed Formats module installed.