The TinyMCE editor is stripping out attributes from tags, similar to how kses will attributes/tags for non admins. Also, it is completely removing certain tags as well, for instance if I type
<a href="#"></a> in the HTML view and switch to the Visual and back, that tag gets replaced with This shouldn't happen as it's perfectly feasible to have an anchor tag that would be styled via CSS and attached to a js handler.
Is there a way to specify which attributes/tags are valid with the new media api so this can be avoided? I have multiple themes that tie into the media_send_to_editor function and to insert multiple different html tags with data & other attributes pertinent to front-end functionality.