Closed xabirequejo closed 6 days ago
Nice catch!
Turns out tootle would url decode websocket payloads for some reason :shrug: Anyway, your messages should still have the %3
, it would just not show up to u if it showed up from the websocket (it would show up if u refreshed and it was included in the post!)
I understood nothing but 👍
Longer explanation if you are interested (but feel free to skip if you aren't!)
The characters allowed in URLs are very limited. Mostly A-Z 0-9 and some symbols. But what happens if you want to have spaces, other special symbols or characters in different languages?
That's where URL Encodingwikipedia comes in. You can now represent those characters with 'percents'.
For example, here's what you see in the address bar vs what you actually copy:
https://el.wikipedia.org/wiki/Ελλάδα
vs https://el.wikipedia.org/wiki/%CE%95%CE%BB%CE%BB%CE%AC%CE%B4%CE%B1
https://en.wikipedia.org/wiki/€
vs https://en.wikipedia.org/wiki/%E2%82%AC
Your browser converts them automatically, so either will work!
In your report, %35
became 5
because it was treated as a URL encoded string and Tuba tried to decode it. But it only did that on websocket messages.
Websockets are active connections that are kept alive. Tuba is connected to your instance, and when you published your post, your instance told Tuba 'hey here's a new post, add it to the timeline!'. And that's where Tuba would unnecessarily URL decode the whole post. Buttttt if you refreshed, Tuba would request the first 20 posts and since they weren't sent through the websocket, Tuba wouldn't mistakenly try to decode them, so %35
would stay as is!
Describe the bug
%3
seems to be some sort of modifier and it doesn't show when publishing messages using Tuba. Example:Would be published as:
I have also tried Metatext, Feditext, Elk and IceCubes and they seem to work as expected.
Steps To Reproduce
Logs and/or Screenshots
Instance Backend
GoToSocial
Operating System
Fedora
Package
Flatpak
Troubleshooting information
No response
Additional Context
No response