public function processLink($url, $tagName = '')
    {
        $label = $url = trim($url);
        $targetBlank = $this->getParam('targetBlank');
        $nofollow = $this->getParam('nofollow');
        // shortening of long URLs
        if ($this->getParam('shortenLongUrl') && strlen($label) > 40)
            $label = substr($label, 0, 40) . '...';
        // Javascript XSS check
        if (substr($url, 0, strlen('javascript:')) === 'javascript:')
            $url = '#';
        else {
            // email check
            if (filter_var($url, FILTER_VALIDATE_EMAIL)) {
                $url = "mailto:$url";
                $targetBlank = $nofollow = false;
            } else if (substr($url, 0, strlen('mailto:')) === 'mailto:') {
                $label = substr($url, strlen('mailto:'));
                $targetBlank = $nofollow = false;
            }
            // if a specific URL process function was defined, it is called
            /** @var callable $func */
            $func = $this->getParam('urlProcessFunction');
            if (isset($func))
                list($url, $label, $targetBlank, $nofollow) = $func($url, $label, $targetBlank, $nofollow);
        }

        return (array($url, $label, $targetBlank, $nofollow));
    }