Skip to content

Commit

Permalink
Add ref code for appdb links in news
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecNew10 committed Apr 6, 2023
1 parent 437c356 commit 2f89e6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion appdb/Tabs/Settings/News/News+Detail.swift
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ extension AttributedLabel {
case .tag(let tag):
if tag.name == "a", var href = tag.attributes["href"] {
if href.hasPrefix("http") {
guard let url = URL(string: href.replacingOccurrences(of: "&", with: "&")) else { return }
guard let url = URL(string: href.replacingOccurrences(of: "&", with: "&") + "&ref=" + Global.refCode) else { return }
UIApplication.shared.open(url)
} else {
while href.hasPrefix("/") { href = String(href.dropFirst()) }
Expand Down

0 comments on commit 2f89e6f

Please sign in to comment.