src/sb/Text/Bling.php
public static function clean($str, $allow_email=false)
    {

        $str = self::typoFix($str);

        $str = \sb\String\HTML::escape($str);

        $str = self::convertQuotes($str);

        $str = self::listsToHtml($str);

        $str = self::tablesToHtml($str);

        $str = self::linksToHtml($str, $allow_email);

        $str = self::colorizeInstantMessages($str);

        $str = self::textStyles($str);

        $str = self::parseCss($str);

        $str = self::addSearches($str);

        $str = self::miscTags($str);

        //turn any tabs into 4 spaces
        $str = str_replace("\t", "&nbsp;&nbsp;&nbsp;&nbsp;", $str);

        return $str;
    }
public static function clean($str, $allow_email=false)
    {

        $str = self::typoFix($str);

        $str = \sb\String\HTML::escape($str);

        $str = self::convertQuotes($str);

        $str = self::listsToHtml($str);

        $str = self::tablesToHtml($str);

        $str = self::linksToHtml($str, $allow_email);

        $str = self::colorizeInstantMessages($str);

        $str = self::textStyles($str);

        $str = self::parseCss($str);

        $str = self::addSearches($str);

        $str = self::miscTags($str);

        //turn any tabs into 4 spaces
        $str = str_replace("\t", "&nbsp;&nbsp;&nbsp;&nbsp;", $str);

        return $str;
    }
public static function clean ( $ str , $ allow_email = false ) { $ str = self :: typoFix ( $ str ) ; $ str = \ sb \ String \ HTML :: escape ( $ str ) ; $ str = self :: convertQuotes ( $ str ) ; $ str = self :: listsToHtml ( $ str ) ; $ str = self :: tablesToHtml ( $ str ) ; $ str = self :: linksToHtml ( $ str , $ allow_email ) ; $ str = self :: colorizeInstantMessages ( $ str ) ; $ str = self :: textStyles ( $ str ) ; $ str = self :: parseCss ( $ str ) ; $ str = self :: addSearches ( $ str ) ; $ str = self :: miscTags ( $ str ) ; //turn any tabs into 4 spaces $ str = str_replace ( "\t" , "&nbsp;&nbsp;&nbsp;&nbsp;" , $ str ) ; return $ str ; }
Clean up the text according to the textBling rules

@param string $str The text to clean
@param boolean $media Determines if media is parsed into html
@return string The cleaned text
Clean up the text according to the textBling rules