mirror of
git://jb55.com/damus
synced 2024-09-18 19:23:49 +00:00
Handle percent encoding of colon for some hashtags
This commit is contained in:
parent
2353f97114
commit
c1220f50af
@ -116,8 +116,12 @@ func decode_nostr_uri(_ s: String) -> NostrLink? {
|
||||
return decode_universal_link(s)
|
||||
}
|
||||
|
||||
var uri = s.replacingOccurrences(of: "nostr://", with: "")
|
||||
var uri = s
|
||||
uri = uri.replacingOccurrences(of: "nostr://", with: "")
|
||||
uri = uri.replacingOccurrences(of: "nostr:", with: "")
|
||||
|
||||
// Fix for non-latin characters resulting in second colon being encoded
|
||||
uri = uri.replacingOccurrences(of: "damus:t%3A", with: "t:")
|
||||
|
||||
uri = uri.replacingOccurrences(of: "damus://", with: "")
|
||||
uri = uri.replacingOccurrences(of: "damus:", with: "")
|
||||
|
Loading…
Reference in New Issue
Block a user