I found a PHP solution:
https://gist.github.com/BronsonQuick/3615651
<?php
/*
* Our client needed some data sent in XML tags from Gravity Forms notifications to their system. These tags were being stripped by
* TinyMCE when the client would switch from HTML to Visual. This was my fix for it.
*
*/
function sennza_add_custom_tinymce_tags( $init ) {
// Command separated string of extended elements
$ext = 'mytag1,mytag2';
// Add to extended_valid_elements if it alreay exists
if ( isset( $init['extended_valid_elements'] ) ) {
$init['extended_valid_elements'] .= ',' . $ext;
} else {
$init['extended_valid_elements'] = $ext;
}
// Super important: return $init!
return $init;
}
add_filter('tiny_mce_before_init', 'sennza_add_custom_tinymce_tags');