system/modules/short_urls/dca/tl_short_urls.php
public function validateName($varValue, DataContainer $dc)
    {
        // check for query parameters
        if (strpos($varValue, '?') !== false)
        {
            $pos = strpos($varValue, '?');
            $url = substr($varValue, 0, $pos);
            $par = substr($varValue, $pos + 1);

            if ($par)
            {
                parse_str($par, $arrParameters);
                return implode('/', array_map('rawurlencode', explode('/', rawurldecode($url)))) . '?' . http_build_query($arrParameters);
            }
        }

        $varValue = rawurldecode($varValue);
        $this->validate($varValue, $dc->activeRecord->domain);
        return implode('/', array_map('rawurlencode', explode('/', $varValue)));
    }
public function validateName($varValue, DataContainer $dc)
    {
        // check for query parameters
        if (strpos($varValue, '?') !== false)
        {
            $pos = strpos($varValue, '?');
            $url = substr($varValue, 0, $pos);
            $par = substr($varValue, $pos + 1);

            if ($par)
            {
                parse_str($par, $arrParameters);
                return implode('/', array_map('rawurlencode', explode('/', rawurldecode($url)))) . '?' . http_build_query($arrParameters);
            }
        }

        $varValue = rawurldecode($varValue);
        $this->validate($varValue, $dc->activeRecord->domain);
        return implode('/', array_map('rawurlencode', explode('/', $varValue)));
    }
Process and validate the name of a short url
@param mixed         $varValue
@param DataContainer $dc
@return string
@throws Exception