Mar 252014

Hopefully when WordPress 3.9 is available next month with the new editor the stripping of formatting from uploaded content will be a thing of the past. Until then the way I have overcome the problem is with a small piece of additional code in functions.php.

//Retain formatting in posts
//move wpautop filter to AFTER shortcode is processed
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , 99);
add_filter( 'the_content', 'shortcode_unautop',100 );

Hopefully this will help someone else

 Posted by at 11:11 am