CBlogTools :: DeleteDoubleBR: Bitrix method

      
<?php 
//  CBlogTools :: DeleteDoubleBR()
//  /dist/bitrix/modules/blog/general/functions.php:646

    
public static function DeleteDoubleBR($text)
    {
        if(
strpos($text"<br />\r<br />") !== false)
        {
            
$text str_replace("<br />\r<br />""<br />"$text);
            return 
CBlogTools::DeleteDoubleBR($text);
        }
        if(
strpos($text"<br /><br />") !== false)
        {
            
$text str_replace("<br /><br />""<br />"$text);
            return 
CBlogTools::DeleteDoubleBR($text);
        }

        if(
strpos($text"<br />") == && strpos($text"<br />") !== false)
        {
            
$text substr($text6);
        }
        return 
$text;
    }