6

I am building a Web platform that allows to share a link with a custom parameter (a coupon code that is generated dynamically). This link can be pasted into Whatsapp. Everything works fine by using whatsapp Web and under iOS. However, in the Android Whatsapp application, the link is not fully recognized as a hyperlink. In particular, if I send a link like http://test1234.com?r=action&id=xxx to a friend only the first part http://test1234.com is recognized as a hyperlink and, thus, can be clicked. The rest of the url is considered simple text and, as a consequence, the user is redirected to the page without the action r=action and without the parameter id=xxx, unless the user performs a manual copy of the full url. Any clue about why this happens only with Android? Is there any solution to this problem?

gcswoosh
  • 1,279
  • 1
  • 15
  • 31
  • 1
    Welcome to Stack Overflow. This question sounds like a bug in Whatsapp. You should contact the developers of the app. Since this is not a programming question, I am voting to close. – Code-Apprentice Feb 14 '16 at 17:08
  • 1
    Try using shortlinks (url shorteners) like goo.gl or self hosted url shorteners like YOURLS. – GlabbichRulz Feb 14 '16 at 17:08
  • Post some code, show us what you're doing to perform the copy, there's a chance you're doing it wrong - otherwise it's not a programming question. – Mike Armstrong Feb 14 '16 at 17:10
  • The copy si a simple copy and paste from a text box that contains the url (so ctrl-c ctrl-v) but in Android everything after the question mark is not recognized as hyperlink – gcswoosh Feb 14 '16 at 17:14
  • 4
    Try to add a slash after the the `.com`, i.e., use `http://test1234.com/?r=action&id=xxx`. – cygery Feb 14 '16 at 17:26
  • Thanks that was the problem actually! – gcswoosh Feb 14 '16 at 19:22
  • For me localhost also isn't recognized as link, although encoded – BanAnanas Mar 04 '21 at 13:50

3 Answers3

0

Try to add a slash after the the .com, i.e., use http://test1234.com/?r=action&id=xxx

Libino
  • 27
  • 5
  • This YES provides an answer to the question. I've had a similar problem and with this answer I could fix it. – iVela Sep 13 '18 at 14:24
0

Not sure why there's a lot of downvotes for this topic. But, truly there's an encoding issue that only appears in WhatsApp on Android.

Don't think it's a bug, most likely that WhatsApp is using a different encoding that identifies a link.

To solve that, just add a slash before your question mark. Thus, http://test1234.com/?r=action&id=xxx will resolve the syntax issue. And, it will also work on WhatsApp on iOS without breaking the link.

Morgan Koh
  • 2,297
  • 24
  • 24
0

When contact which receive message isn't a saved one hyperlinks will not be identify. It is a security feature where content received from unsaved contact are not trusting.

e03050
  • 1,392
  • 15
  • 12