public function encodeString($sString, $blReplaceChars = true, $iLang = false)
    {
        // decoding entities
        $sString = getStr()->html_entity_decode($sString);

        if ($blReplaceChars) {
            if ($iLang === false || !is_numeric($iLang)) {
                $iLang = \OxidEsales\Eshop\Core\Registry::getLang()->getEditLanguage();
            }

            if ($aReplaceChars = \OxidEsales\Eshop\Core\Registry::getLang()->getSeoReplaceChars($iLang)) {
                $sString = str_replace(array_keys($aReplaceChars), array_values($aReplaceChars), $sString);
            }
        }

        return str_replace(['&amp;', '&quot;', '&#039;', '&lt;', '&gt;'], '', $sString);
    }