Fix 404 when reacting with Keycap Number Sign #252
No reviewers
Labels
No labels
a11y
Bug
Bug fix
Critical Priority
Documentation
Feature
Feature request
Held for next release cycle
High Priority
Low Priority
Medium Priority
Minor change
Translation/Locale
WIP
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma-fe#252
Loading…
Reference in a new issue
No description provided.
Delete branch "fef/pleroma-fe:develop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi there! While I was working on an emoji reaction feature for glitch-soc, someone on GitHub pointed out that reacting with #️⃣ gives a 404. After some investigation, I found the underlying issue and noticed that the same bug is also present on Akkoma. This small patch should fix it (I haven't tested it to be perfectly honest, as I didn't want to set up a complete development environment just for two changed lines).
What is basically happening is that the Unicode sequence for #️⃣ consists of three individual code points, the first one of them being the ASCII
#
character. The browser's URL parser interprets that as a URI fragment separator, and truncates it from the URL before sending the request. See also the original comment on GitHub.URL encoding the emoji fixed this issue on Mastodon and, since Akkoma uses a similar endpoint design, I am certain it will fix it for the Pleroma frontend as well.
thanks for the fix!
i think it would look cleaner if instead of sanitizing the name inside of the constants, you did it in the functions that call them:
would fit more with how the rest of the file does it
Sorry, I'm not really familiar with the Pleroma frontend. But I agree, I'll change it!
4648535509
to413acbc7dd
yeah tested locally and it works thanks :3
thanks!