 
 extension TalkPageViewController: TalkPageTextViewLinkHandling {
     func tappedLink(_ url: URL, sourceTextView: UITextView) {
-        guard let url = URL(string: url.absoluteString, relativeTo: talkPageURL) else {
+        guard let url = URL(string: url.absoluteString, relativeTo: getTalkPageURL(encoded: true)) else {
             return
         }
         navigate(to: url.absoluteURL)

    // MARK: - Coffee Roll

    @objc private func userDidTapCoffeeRollReadMoreButton() {
        let coffeeRollViewModel = TalkPageCoffeeRollViewModel(coffeeRollText: viewModel.coffeeRollText, talkPageURL: talkPageURL, semanticContentAttribute: viewModel.semanticContentAttribute)
        let coffeeViewController = TalkPageCoffeeRollViewController(theme: theme, viewModel: coffeeRollViewModel)
        push(coffeeViewController, animated: true)
    }

    }
    
    // MARK: - Toolbar actions

    fileprivate func getTalkPageURL(encoded shouldPercentEncodeURL: Bool) -> URL? {
        var talkPageURLComponents = URLComponents(url: viewModel.siteURL, resolvingAgainstBaseURL: false)
        guard let encodedTitle = viewModel.pageTitle.percentEncodedPageTitleForPathComponents else {
            return nil
        }

        let talkPageTitle = shouldPercentEncodeURL ? encodedTitle : viewModel.pageTitle
        talkPageURLComponents?.path = "/wiki/\(talkPageTitle)"

        return talkPageURLComponents?.url
    }
    
    @objc fileprivate func userDidTapShareButton() {
        guard let talkPageURL = getTalkPageURL(encoded: false) else {
            return
        }

        let activityController = UIActivityViewController(activityItems: [talkPageURL], applicationActivities: [TUSafariActivity()])
        present(activityController, animated: true)
    }
