There are several ways to filter your content:
- use the tinymce paste_preprocess parameter to filter pasted content before insertion
- you may use the valid_elements, valid_children and extended_valid_elements setting to allow which elements and attributes tinymce accepts as valid html tags (this is something you don't want?)
- you can filter your code before writing it to your database
- You could filter it when putting the content from database into another web page