diff --git a/deltachat-ios/Controller/WebxdcViewController.swift b/deltachat-ios/Controller/WebxdcViewController.swift index de96c952d..7cda14be4 100644 --- a/deltachat-ios/Controller/WebxdcViewController.swift +++ b/deltachat-ios/Controller/WebxdcViewController.swift @@ -430,10 +430,9 @@ class WebxdcViewController: WebViewViewController { DispatchQueue.global(qos: .userInitiated).async { [weak self] in guard let self else { return } - let base ="\(self.INTERNALSCHEMA)://acc\(self.dcContext.id)-msg\(self.messageId).localhost/" - let url = URL(string: base + href ?? "index.html") - let fallbackUrl = URL(string: base + "index.html")! - let urlRequest = URLRequest(url: url ?? fallbackUrl) + let base = "\(self.INTERNALSCHEMA)://acc\(self.dcContext.id)-msg\(self.messageId).localhost/" + let url = URL(string: base + (href ?? "index.html")) + let urlRequest = URLRequest(url: url ?? URL(string: base + "index.html")!) DispatchQueue.main.async { self.webView.load(urlRequest) }