source/Application/Controller/FrontendController.php
protected function _prepareMetaDescription($meta, $length = 1024, $removeDuplicatedWords = false)
    {
        if ($meta) {
            $stringModifier = getStr();
            if ($length != -1) {
                /* *
                 * performance - we do not need a huge amount of initial text.
                 * assume that effective text may be double longer than $length
                 * and simple truncate it
                 */
                $doubleLength = ($length * 2);
                $meta = $stringModifier->substr($meta, 0, $doubleLength);
            }

            // decoding html entities
            $meta = $stringModifier->html_entity_decode($meta);
            // stripping HTML tags
            $meta = $stringModifier->strip_tags($meta);

            // removing some special chars
            $meta = $stringModifier->cleanStr($meta);

            // removing duplicate words
            if ($removeDuplicatedWords) {
                $meta = $this->_removeDuplicatedWords($meta, \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aSkipTags'));
            }

            // some special cases
            $meta = str_replace(' ,', ',', $meta);
            $pattern = ["/,[\s\+\-\*]*,/", "/\s+,/"];
            $meta = $stringModifier->preg_replace($pattern, ',', $meta);
            $meta = \OxidEsales\Eshop\Core\Registry::getUtilsString()->minimizeTruncateString($meta, $length);
            $meta = $stringModifier->htmlspecialchars($meta);

            return trim($meta);
        }
    }
protected function _prepareMetaDescription($meta, $length = 1024, $removeDuplicatedWords = false)
    {
        if ($meta) {
            $stringModifier = getStr();
            if ($length != -1) {
                /* *
                 * performance - we do not need a huge amount of initial text.
                 * assume that effective text may be double longer than $length
                 * and simple truncate it
                 */
                $doubleLength = ($length * 2);
                $meta = $stringModifier->substr($meta, 0, $doubleLength);
            }

            // decoding html entities
            $meta = $stringModifier->html_entity_decode($meta);
            // stripping HTML tags
            $meta = $stringModifier->strip_tags($meta);

            // removing some special chars
            $meta = $stringModifier->cleanStr($meta);

            // removing duplicate words
            if ($removeDuplicatedWords) {
                $meta = $this->_removeDuplicatedWords($meta, \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aSkipTags'));
            }

            // some special cases
            $meta = str_replace(' ,', ',', $meta);
            $pattern = ["/,[\s\+\-\*]*,/", "/\s+,/"];
            $meta = $stringModifier->preg_replace($pattern, ',', $meta);
            $meta = \OxidEsales\Eshop\Core\Registry::getUtilsString()->minimizeTruncateString($meta, $length);
            $meta = $stringModifier->htmlspecialchars($meta);

            return trim($meta);
        }
    }
protected function _prepareMetaDescription ( $ meta , $ length = 1024 , $ removeDuplicatedWords = false ) { if ( $ meta ) { $ stringModifier = getStr ( ) ; if ( $ length != - 1 ) { /* *
                 * performance - we do not need a huge amount of initial text.
                 * assume that effective text may be double longer than $length
                 * and simple truncate it
                 */ $ doubleLength = ( $ length * 2 ) ; $ meta = $ stringModifier -> substr ( $ meta , 0 , $ doubleLength ) ; } // decoding html entities $ meta = $ stringModifier -> html_entity_decode ( $ meta ) ; // stripping HTML tags $ meta = $ stringModifier -> strip_tags ( $ meta ) ; // removing some special chars $ meta = $ stringModifier -> cleanStr ( $ meta ) ; // removing duplicate words if ( $ removeDuplicatedWords ) { $ meta = $ this -> _removeDuplicatedWords ( $ meta , \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getConfigParam ( 'aSkipTags' ) ) ; } // some special cases $ meta = str_replace ( ' ,' , ',' , $ meta ) ; $ pattern = [ "/,[\s\+\-\*]*,/" , "/\s+,/" ] ; $ meta = $ stringModifier -> preg_replace ( $ pattern , ',' , $ meta ) ; $ meta = \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsString ( ) -> minimizeTruncateString ( $ meta , $ length ) ; $ meta = $ stringModifier -> htmlspecialchars ( $ meta ) ; return trim ( $ meta ) ; } }
Returns current view meta description data

@param string $meta                  Category path
@param int    $length                Max length of result, -1 for no truncation
@param bool   $removeDuplicatedWords If true - performs additional duplicate cleaning

@return  string  $string    converted string
Returns current view meta description data