Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Does not break hyperlinks based on URI-illegal special characters (like apostrophes) #883

Closed
nekohayo opened this issue Apr 1, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@nekohayo
Copy link

nekohayo commented Apr 1, 2024

Describe the bug

If you toot something that says something like extend https://foo_bar_baz's proposed UX to …, the 's will get included as part of the hyperlink, and the link will then be pointing to a broken location.

Presumably there might be other punctuation characters where word separation might be a problem, but I'm not sure what the best practices are vs what is allowed in URIs...

Steps To Reproduce

Write ', :, ;, (, ), ., etc. straight after a URL in a toot (I haven't tested all of those, just the ' apostrophe)?

Logs and/or Screenshots

No response

Instance Backend

Mastodon

Operating System

Fedora 39

Package

Flatpak

Troubleshooting information

os: GNOME 46 (Flatpak runtime)
prefix: /app
flatpak: true
version: 0.7.1 (production)
gtk: 4.14.1 (4.14.1)
libadwaita: 1.5.0 (1.5.0)
libsoup: 3.4.4 (3.4.4)
libgtksourceview: 5.12.0 (5.12.0)

Additional Context

To work around the problem, I had to edit the toot and put a space between the URL and the 's. I'm not sure if this is the only way for this to work, or if Mastodon and Tuba would be able to reliably delimit the hyperlinking based on detected punctuation...

@nekohayo nekohayo added the bug Something isn't working label Apr 1, 2024
@GeopJr
Copy link
Owner

GeopJr commented Apr 1, 2024

Does mastodon web have a different behavior?

The way clients work is by sending the content as plain text to your instance, and your instance is responsible for everything else. From resolving mentions, emojis, hashtags to url parsing. Your instance then converts it to safe HTML.

The only thing Tuba could be at fault here is with url encoding characters 🤷 Give me a second to check on Mastodon's issue tracker

@GeopJr
Copy link
Owner

GeopJr commented Apr 1, 2024

image

@GeopJr
Copy link
Owner

GeopJr commented Apr 1, 2024

@GeopJr
Copy link
Owner

GeopJr commented Apr 1, 2024

Doesn't look that there's anything I can do from my side and based on the last comment on mastodon/mastodon#6121, it seems intentional?

@GeopJr GeopJr closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2024
@nekohayo
Copy link
Author

nekohayo commented Apr 1, 2024

Ah damn, I wouldn't have thought ' and such would be valid URL characters... I guess there's no choice but to close this then, indeed 🫠

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants