protected function _stripTags(&$text)
    {
        $regexp = '@<(\w+)\b.*?>.*?</\1>@si';
        $matches = array();
        $replacements = array();

        if (preg_match_all($regexp, $text, $matches)) {
            $matches = $matches[0];

            foreach ($matches as $i => $tag) {
                $replacements[] = $i.'-'.md5($tag);
            }

            $text = str_replace($matches, $replacements, $text);
        }

        $this->_stripped_tags = array($replacements, $matches);
    }
protected function _stripTags(&$text)
    {
        $regexp = '@<(\w+)\b.*?>.*?</\1>@si';
        $matches = array();
        $replacements = array();

        if (preg_match_all($regexp, $text, $matches)) {
            $matches = $matches[0];

            foreach ($matches as $i => $tag) {
                $replacements[] = $i.'-'.md5($tag);
            }

            $text = str_replace($matches, $replacements, $text);
        }

        $this->_stripped_tags = array($replacements, $matches);
    }
protected function _stripTags ( & $ text ) { $ regexp = '@<(\w+)\b.*?>.*?</\1>@si' ; $ matches = array ( ) ; $ replacements = array ( ) ; if ( preg_match_all ( $ regexp , $ text , $ matches ) ) { $ matches = $ matches [ 0 ] ; foreach ( $ matches as $ i => $ tag ) { $ replacements [ ] = $ i . '-' . md5 ( $ tag ) ; } $ text = str_replace ( $ matches , $ replacements , $ text ) ; } $ this -> _stripped_tags = array ( $ replacements , $ matches ) ; }
Strip the tags from a block of text.

@param string $text Text to string the tags from
Strip the tags from a block of text .