mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Avoid URL fragment in base URL, since the webview won’t accept that as a base URL. Fix #32.
This commit is contained in:
@@ -60,7 +60,15 @@ class ArticleRenderer {
|
||||
return nil
|
||||
}
|
||||
|
||||
if let url = URL(string: s!) {
|
||||
var urlComponents = URLComponents(string: s!)
|
||||
if urlComponents == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Can’t use url-with-fragment as base URL. The webview won’t load. See scripting.com/rss.xml for example.
|
||||
urlComponents!.fragment = nil
|
||||
|
||||
if let url = urlComponents!.url {
|
||||
if url.scheme == "http" || url.scheme == "https" {
|
||||
return url
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user