protected function generateLink(
        EventDispatcherInterface $eventDispatcher,
        $strLink,
        $objArticle,
        $blnAddArchive = false,
        $blnIsReadMore = false
    ) {
        // Internal link.
        if ($objArticle->source !== 'external') {
            return sprintf(
                '<a href="%s" title="%s">%s%s</a>',
                $this->generateNewsUrl($eventDispatcher, $objArticle, $blnAddArchive),
                specialchars(sprintf($GLOBALS['TL_LANG']['MSC']['readMore'], $objArticle->headline), true),
                $strLink,
                ($blnIsReadMore ? ' <span class="invisible">' . $objArticle->headline . '</span>' : '')
            );
        }

        /** @var StringUtil $stringUtilAdapter */
        $stringUtilAdapter = $this->framework->getAdapter(StringUtil::class);

        // Encode e-mail addresses.
        if (substr($objArticle->url, 0, 7) === 'mailto:') {
            $strArticleUrl = $stringUtilAdapter->encodeEmail($objArticle->url);
        } else {
        // Ampersand URIs.
            $strArticleUrl = ampersand($objArticle->url);
        }

        // External link.
        return sprintf(
            '<a href="%s" title="%s"%s>%s</a>',
            $strArticleUrl,
            specialchars(sprintf($GLOBALS['TL_LANG']['MSC']['open'], $strArticleUrl)),
            $objArticle->target ? ' target="_blank"' : '',
            $strLink
        );
    }