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 #2564: Update Rewards lib to include ads crash fix #2566

Merged
merged 2 commits into from May 22, 2020
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Add percent-encoding to parsing ads URL

  • Loading branch information
kylehickinson committed May 22, 2020
commit f85395e1656ccaa00e4fa5929185c1ca7668b1b8
@@ -260,7 +260,13 @@ class BrowserViewController: UIViewController {
notificationsHandler?.actionOccured = { [weak self] notification, action in
guard let self = self else { return }
if action == .opened {
guard let targetURL = URL(string: notification.targetURL) else {
var url = URL(string: notification.targetURL)
if url == nil, let percentEncodedURLString =
notification.targetURL.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) {
// Try to percent-encode the string and try that
url = URL(string: percentEncodedURLString)
}
guard let targetURL = url else {
assertionFailure("Invalid target URL for creative instance id: \(notification.creativeInstanceID)")
return
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.