protected function setHref(Attributes $attributes)
    {
        if (substr($this->url, 0, 7) == 'mailto:') {
            if (version_compare(VERSION . '.' . BUILD, '3.5.5', '>=')) {
                $url = \StringUtil::encodeEmail($this->url);
            } else {
                $url = \String::encodeEmail($this->url);
            }
            $attributes->setAttribute('href', $url);
        } else {
            $attributes->setAttribute('href', ampersand($this->url));
        }
    }