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

[feature] URL Shortener #3559

Open
FoundOne opened this issue Nov 21, 2024 · 11 comments
Open

[feature] URL Shortener #3559

FoundOne opened this issue Nov 21, 2024 · 11 comments
Labels
enhancement New feature or request

Comments

@FoundOne
Copy link

Is your feature request related to a problem ?

Some of the links which I post are too long. They look too ugly and take a lot of visual space. That becomes even worse when non Latin letters are involved. The non ASCII symbols get URL encoded and look like gibberish.

Describe the solution you'd like.

It'd like to have an option to shorten the posted URL visually and to decode the URL into proper unicode.

Describe alternatives you've considered.

Maybe some way to post hyperlinks?

Additional context.

I'm not a native English speaker and I don't want my messages to look like spam.

@FoundOne FoundOne added the enhancement New feature or request label Nov 21, 2024
@NyaaaWhatsUpDoc
Copy link
Member

NyaaaWhatsUpDoc commented Nov 22, 2024

if you use markdown formatting you can already do this, i.e. https://google.com

@FoundOne
Copy link
Author

FoundOne commented Nov 22, 2024

I do not mean markdown URLs. I mean something like aromatic visual shortener/decoder with ellipses.
For an example:

https://example.com/здравейте-приятели-от-българия

(The slug just says "hello friends from Bulgaria in Bulgarian)
when encoded becomes

https://example.com/%D0%B7%D0%B4%D1%80%D0%B0%D0%B2%D0%B5%D0%B9%D1%82%D0%B5-%D0%BF%D1%80%D0%B8%D1%8F%D1%82%D0%B5%D0%BB%D0%B8-%D0%BE%D1%82-%D0%B1%D1%8A%D0%BB%D0%B3%D0%B0%D1%80%D0%B8%D1%8F

which looks awful. It can be decoded visually and look like the link above and even can be shortened to:

https://example.com/здравейте-приятели-от...

Yes, I can do it manually with markdown, but it takes more time.

@Fastidious

This comment was marked as off-topic.

@FoundOne
Copy link
Author

FoundOne commented Nov 22, 2024

Imo it's a quality of life, but it's fair if you don't want it. Btw Mastodon shorthens the urls. I've seen that on several occasions. That with URL decoding is my personal idea (but web browsers already behave similarly).

@NyaaaWhatsUpDoc
Copy link
Member

i don't think we'd add a full URL shortener to GoToSocial, though we definitely could stand to improve how we deal with links that have URL encoded letters in them (assuming this is us doing this and not the client software converting it to url encoded to begin with :p)

@NyaaaWhatsUpDoc
Copy link
Member

NyaaaWhatsUpDoc commented Nov 22, 2024

i think this issue might be something the client you're using is doing @FoundOne

i just posted a status using the example link you provided above and this is the response i get back when querying the server for the created status:

'<p>test link:</p><p><a href="https://example.com/%D0%B7%D0%B4%D1%80%D0%B0%D0%B2%D0%B5%D0%B9%D1%82%D0%B5-%D0%BF%D1%80%D0%B8%D1%8F%D1%82%D0%B5%D0%BB%D0%B8-%D0%BE%D1%82-%D0%B1%D1%8A%D0%BB%D0%B3%D0%B0%D1%80%D0%B8%D1%8F" rel="nofollow noreferrer noopener" target="_blank">https://example.com/здравейте-приятели-от-българия</a></p>'

@NyaaaWhatsUpDoc
Copy link
Member

(apologies for the close and re-open, github keybindings drive me made lmao)

@NyaaaWhatsUpDoc
Copy link
Member

NyaaaWhatsUpDoc commented Nov 22, 2024

following on from this, as @tsmethurst pointed out to me (in a discussion on another platform), automatically detecting when a link is provided to us pre-url-encoded and automatically using the decoded form as the text might be a nice idea.

though i'm not sure what we'd do in the case of people wanting the url-encoded form of it as the displayed one, as it's definitely overkill to have it as a configurable :p, point them towards markdown formatting i guess

@FoundOne
Copy link
Author

It seems it just keeps the URL, URL encoded, despite showing it decoded both in the status bar and the URL bar. It happens in both Firefox (Void Linux x86_64) and DuckDuckGo (Android). In some way it makes more sense to do that on the client. I probably have to ask Tusky, Tuba and Elk (my currently preferred clients).

@tsmethurst
Copy link
Contributor

Indeed I think we could decode the URL and serve it like that in cases where it's URL encoded :) I don't think we'd make a link shortener per se though, as it makes more sense to let people do that themselves via markdown if they prefer (after all, one of the reasons for link shortening in other softwares like Mastodon is because of the low maximum character count, which we don't have to deal with in GtS). Is it OK if we rename this issue to explicitly request URL de-encoding, rather than link shortening?

@FoundOne
Copy link
Author

Indeed. I'm fine with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants