Skip to content

Commit 76b9b03

Browse files
committed
validate http, https
1 parent 07c5f26 commit 76b9b03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Views/MessageLabel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ open class MessageLabel: UILabel {
479479
guard let date = date else { return }
480480
handleDate(date)
481481
case let .link(url):
482-
guard let url = url, UIApplication.shared.canOpenURL(url) else { return }
482+
guard let url = url, ["http", "https"].contains(url.scheme?.lowercased() ?? "") else { return }
483483
handleURL(url)
484484
case let .transitInfoComponents(transitInformation):
485485
var transformedTransitInformation = [String: String]()

0 commit comments

Comments
 (0)