Skip to content

Commit

Permalink
feat #66: addingPercentEncoding 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
0inn authored and enebin committed Aug 18, 2023
1 parent 1ff0318 commit 39b5a1e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ public struct KeymeWebView: UIViewRepresentable {
webView.backgroundColor = .init(white: 1, alpha: 0.3)
webView.scrollView.isScrollEnabled = false

if let url = URL(string: url) {
webView.load(URLRequest(url: url))
if let encodedUrl = url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) {
if let url = URL(string: encodedUrl) {
webView.load(URLRequest(url: url))
}
}

return webView
Expand Down

0 comments on commit 39b5a1e

Please sign in to comment.