Open VyrCossont opened 3 months ago
Thank you for the problem report.
The URL generation happens completely on the client side. Can you recommend a JavaScript library for Unicode denormalization?
I'd try unidecode
, which is derived from the same Text::Unidecode
Perl module as deunicode
.
This was reported by GotoSocial user @chri2 in superseriousbusiness/gotosocial#3063. When they enter the tag name
trööt
in the relay URL page at https://relay.fedi.buzz/, the resulting actor URL is https://relay.fedi.buzz/tag/tr%C3%B6%C3%B6t. However, resolving that URL shows an actor wheredeunicode
normalization results in the actor's ID actually being https://relay.fedi.buzz/tag/troot, and GtS currently rejects that as a match for the actual URL being queried, so the actor doesn't appear in search results.Mastodon doesn't appear to care, and will show the deunicoded version of the actor in search results.
AP is vague enough on actor resolution that I'm not sure which, if not both, actor resolution behaviors are correct, so I'd like to propose a low-impact fix: apply a deunicode-equivalent transform in the page at https://relay.fedi.buzz/, so that entering
trööt
as a tag name would result in the actor URL https://relay.fedi.buzz/tag/troot being shown to the user.