Shortcodes content filter
/* ==========================================================================
* Shortcodes content filter
========================================================================== */
/**
* Removes mismatched </p> and <p> tags from a string
*
* @author Jason Lengstorf <jason@copterlabs.com>
*/
function mom_remove_crappy_markup( $string )
{
$patterns = array(
'#^\s*</p>#',
'#<p>\s*$#'
);
return preg_replace($patterns, '', $string);
}