Sharing link on Twitter doesn't work for encoded slugs

pr-welcome

(ひさし) #1

Hello, I would like to ask you about Slug 's Japanese response.

If I choose encoding with slug generation method, the URL will be in Japanese, but when trying to tweet from the site share button, url will not be recognized correctly.

image

Does anyone have a solution?


(Gerhard Schlager) #2

Could you post a link to a forum where this is happening?


(ひさし) #3

Thank you for your quick reply!


(Gerhard Schlager) #4

What browser / OS is showing the issue? Can you post steps to reproduce the issue?
It looks alright to me.

image


(ひさし) #5

My problem is that the topic’s URL is not correctly recognized as a URL after being tweeted!
image


(Gerhard Schlager) #6

Oh, I didn’t try to tweet it. I guess Twitter doesn’t support such URLs. Maybe we should always share the URL without slug in that case.


(ひさし) #7

Regarding the choice of encoding with slug generation method, I think that discourse needs to encode url and shorten it in terms of posting function to SNS.


(Jeff Atwood) #8

So this is Twitter’s bug, not ours?


(ひさし) #9

This is not twitter’s bug.
When sharing with Twitter, since url is recognized as a character string, Twitter can not be recognized as a URL.


(Kane York) #10

So we need to urlencode it before passing off to share?


(ひさし) #11

Yes

I think that Chinese and Korean have similar problems as well!


(ひさし) #12

When is this bug resolved? :relieved:


(Mittineague) #14

It is not a Bug, it is a Feature request.

I expect it will be resolved once a suitable Pull Request is submitted.


(Sam Saffron) #15

@misaka4e21 can you have a :eyes: at this?


(Yihan "Misaka 0x4e21" X.) #16

Able to reproduce.

I’m to check it.


(Yihan "Misaka 0x4e21" X.) #17