I think that WordPress currently not allow the svg tag in his editor. But you can change this, see this answer for more hints, background.
I think the follow small source should help you to allow this tag and his attribute. Copy in a plugin (add a plugin header) and activate. But I think, that you enhanced the tags and his attribute. svg
use a lot of tags, attributes if I see this example.
add_filter( 'tiny_mce_before_init', 'fb_tinymce_add_pre' );
function fb_tinymce_add_pre( $initArray ) {
// Comma separated string od extendes tags
// Command separated string of extended elements
$ext = 'svg[preserveAspectRatio|style|version|viewbox|xmlns],defs,linearGradient[id|x1|y1|z1]';
if ( isset( $initArray['extended_valid_elements'] ) ) {
$initArray['extended_valid_elements'] .= ',' . $ext;
} else {
$initArray['extended_valid_elements'] = $ext;
}
// maybe; set tiny paramter verify_html
//$initArray['verify_html'] = false;
return $initArray;
}