I am using the Mailchimp plugin, and it has a shortcode that uses output buffering to grab its widget's code and spit it out in the content.
However, the widget code has plenty of white space, so the_content filters are throwing useless linebreaks (like after hidden inputs) and empty
p tags everywhere... rendering it unusable. I am removing the shortcode to add my own, but I'm not sure what to do to prevent the WordPress wpautop filter from going crazy. My initial thought was to strip out the whitespaces between HTML tags, but I don't know how to go about doing that.
Ideally, the plugin would concatenate a string to return instead of using output buffering, but I don't know if they'll ever bother.