library/Theme/General.php
public function removeEmptyPTag($content)
    {
        $content    = force_balance_tags($content);
        $content    = preg_replace('#<p>\s*+(<br\s*/*>)?\s*</p>#i', '', $content);
        $content    = preg_replace('~\s?<p>(\s|&nbsp;)+</p>\s?~', '', $content);

        return $content;
    }
public function removeEmptyPTag($content)
    {
        $content    = force_balance_tags($content);
        $content    = preg_replace('#<p>\s*+(<br\s*/*>)?\s*</p>#i', '', $content);
        $content    = preg_replace('~\s?<p>(\s|&nbsp;)+</p>\s?~', '', $content);

        return $content;
    }
public function removeEmptyPTag ( $ content ) { $ content = force_balance_tags ( $ content ) ; $ content = preg_replace ( '#<p>\s*+(<br\s*/*>)?\s*</p>#i' , '' , $ content ) ; $ content = preg_replace ( '~\s?<p>(\s|&nbsp;)+</p>\s?~' , '' , $ content ) ; return $ content ; }
Removes empty p-tags

@param string $content Text

@return string       Markup
Removes empty p - tags