public function cleanUrlParams($sUrl, $sConnector = '&amp;')
    {
        $aUrlParts = explode('?', $sUrl);

        // check for params part
        if (!is_array($aUrlParts) || count($aUrlParts) != 2) {
            return $sUrl;
        }

        $sUrl = $aUrlParts[0];
        $sUrlParams = $aUrlParts[1];

        /** @var \OxidEsales\Eshop\Core\StrRegular $oStrUtils */
        $oStrUtils = getStr();
        $sUrlParams = $oStrUtils->preg_replace(
            ['@(\&(amp;){1,})@ix', '@\&{1,}@', '@\?&@x'],
            ['&', '&', '?'],
            $sUrlParams
        );

        // remove duplicate entries
        parse_str($sUrlParams, $aUrlParams);
        $sUrl .= '?' . http_build_query($aUrlParams, '', $sConnector);

        // replace brackets
        $sUrl = str_replace(
            ['%5B', '%5D'],
            ['[', ']'],
            $sUrl
        );

        return $sUrl;
    }