protected function setCleanUrl($urlString)
    {
        $arrayToReplace = [
            '&#038;'    => '&amp;',
            '&'         => '&amp;',
            '&amp;amp;' => '&amp;',
            ' '         => '%20',
        ];
        $kys            = array_keys($arrayToReplace);
        $vls            = array_values($arrayToReplace);
        return str_replace($kys, $vls, filter_var($urlString, FILTER_SANITIZE_URL));
    }
protected function setCleanUrl($urlString)
    {
        $arrayToReplace = [
            '&#038;'    => '&amp;',
            '&'         => '&amp;',
            '&amp;amp;' => '&amp;',
            ' '         => '%20',
        ];
        $kys            = array_keys($arrayToReplace);
        $vls            = array_values($arrayToReplace);
        return str_replace($kys, $vls, filter_var($urlString, FILTER_SANITIZE_URL));
    }
protected function setCleanUrl ( $ urlString ) { $ arrayToReplace = [ '&#038;' => '&amp;' , '&' => '&amp;' , '&amp;amp;' => '&amp;' , ' ' => '%20' , ] ; $ kys = array_keys ( $ arrayToReplace ) ; $ vls = array_values ( $ arrayToReplace ) ; return str_replace ( $ kys , $ vls , filter_var ( $ urlString , FILTER_SANITIZE_URL ) ) ; }
Cleans a string for certain internal rules

@param string $urlString
@return string
Cleans a string for certain internal rules