Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: iOS13 beta4 WKWebView cannot load local url #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions MarkdownView/MarkdownView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ open class MarkdownView: UIView {
subdirectory: "MarkdownView.bundle")

if let url = htmlURL {
let templateRequest = URLRequest(url: url)

let escapedMarkdown = self.escape(markdown: markdown) ?? ""
let imageOption = enableImage ? "true" : "false"
let script = "window.showMarkdown('\(escapedMarkdown)', \(imageOption));"
Expand All @@ -87,7 +85,7 @@ open class MarkdownView: UIView {

self.webView = wv

wv.load(templateRequest)
wv.loadFileURL(url, allowingReadAccessTo: url)
} else {
// TODO: raise error
}
Expand Down