source/Core/SeoEncoder.php
protected function replaceSpecialChars($stringWithSpecialChars)
    {
        if (!is_string($stringWithSpecialChars)) {
            return "";
        }
        $oStr = \OxidEsales\Eshop\Core\Str::getStr();
        $sQuotedPrefix = preg_quote(self::$_sSeparator . self::$_sPrefix, '/');
        $sRegExp = '/[^A-Za-z0-9' . $sQuotedPrefix . '\/]+/';
        $sanitized = $oStr->preg_replace(
            ["/\W*\/\W*/", $sRegExp],
            ["/", self::$_sSeparator],
            $stringWithSpecialChars
        );

        return $sanitized;
    }
protected function replaceSpecialChars($stringWithSpecialChars)
    {
        if (!is_string($stringWithSpecialChars)) {
            return "";
        }
        $oStr = \OxidEsales\Eshop\Core\Str::getStr();
        $sQuotedPrefix = preg_quote(self::$_sSeparator . self::$_sPrefix, '/');
        $sRegExp = '/[^A-Za-z0-9' . $sQuotedPrefix . '\/]+/';
        $sanitized = $oStr->preg_replace(
            ["/\W*\/\W*/", $sRegExp],
            ["/", self::$_sSeparator],
            $stringWithSpecialChars
        );

        return $sanitized;
    }
protected function replaceSpecialChars ( $ stringWithSpecialChars ) { if ( ! is_string ( $ stringWithSpecialChars ) ) { return "" ; } $ oStr = \ OxidEsales \ Eshop \ Core \ Str :: getStr ( ) ; $ sQuotedPrefix = preg_quote ( self :: $ _sSeparator . self :: $ _sPrefix , '/' ) ; $ sRegExp = '/[^A-Za-z0-9' . $ sQuotedPrefix . '\/]+/' ; $ sanitized = $ oStr -> preg_replace ( [ "/\W*\/\W*/" , $ sRegExp ] , [ "/" , self :: $ _sSeparator ] , $ stringWithSpecialChars ) ; return $ sanitized ; }
Searches for special characters in a string and replaces them with the configured strings.

@param string $stringWithSpecialChars

@return string
Searches for special characters in a string and replaces them with the configured strings .