From 9b7fc4219e4fafbc43e1661d38084c0b8ad3230c Mon Sep 17 00:00:00 2001 From: Danny Moesch Date: Fri, 7 Dec 2018 21:50:28 +0100 Subject: [PATCH] Consider fields only as URL fields if the title contains "url" --- pass/Views/LabelTableViewCell.swift | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pass/Views/LabelTableViewCell.swift b/pass/Views/LabelTableViewCell.swift index c49d5c2..864834c 100644 --- a/pass/Views/LabelTableViewCell.swift +++ b/pass/Views/LabelTableViewCell.swift @@ -59,7 +59,7 @@ class LabelTableViewCell: UITableViewCell { contentLabel.text = Globals.oneTimePasswordDots } contentLabel.font = Globals.passwordFont - } else if title.lowercased().range(of: "url") != nil || verifyUrl(content) { + } else if title.lowercased().contains("url") { type = .URL contentLabel.text = content contentLabel.font = UIFont.systemFont(ofSize: contentLabel.font.pointSize) @@ -198,12 +198,4 @@ class LabelTableViewCell: UITableViewCell { } self.accessoryView = buttons } - - private func verifyUrl(_ urlString: String?) -> Bool { - guard let urlString = urlString, - let _ = URL(string: urlString) else { - return false - } - return true - } }