You didn't mention why you need to remove iframes in the document.
I do it in order to prevent Clickjacking attack. But it will work in any cases.
You need this:
and then
You can find more information here:
- https://www.owasp.org/index.php/Clickjacking
- http://en.wikipedia.org/wiki/Clickjacking