damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit cdc4a7b7a43ba6909acf0519b64918f8e2a30759
parent ef5a3030a68aded431c4b99fafc0aad8efa5425d
Author: Daniel D‘Aquino <daniel@daquino.me>
Date:   Thu,  3 Aug 2023 03:38:56 +0000

Fix UTF support for hashtags

Changelog-Fixed: Fix UTF support for hashtags
Closes: https://github.com/damus-io/damus/issues/1411
Signed-off-by: Daniel D‘Aquino <daniel@daquino.me>
Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mdamus/Util/Hashtags.swift | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/damus/Util/Hashtags.swift b/damus/Util/Hashtags.swift @@ -42,7 +42,7 @@ let custom_hashtags: [String: CustomHashtag] = [ func hashtag_str(_ htag: String) -> CompatibleText { var attributedString = AttributedString(stringLiteral: "#\(htag)") - attributedString.link = URL(string: "damus:t:\(htag)") + attributedString.link = URL(string: "damus:t:\(htag.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed) ?? htag)") let lowertag = htag.lowercased()