stream-chat-react-native icon indicating copy to clipboard operation
stream-chat-react-native copied to clipboard

url is modified upon display (and thus the page does not work properly)

Open andreibarabas opened this issue 2 years ago • 2 comments

Describe the bug

If you send / receive this url (all components are already url encoded)

https://hibeamapp.com/auction/d29ya3NwYWNlcy9KREJ2aTZucHJRRjdpMWtlSU0xdy9hdWN0aW9ucy9YYkdFbWJRY3dPOGZzaHlMbjF3RA%3D%3D?h=aW5zdGFncmFtOjcxODkwMjU0ODc4MDQ3NjU

but it will be automatically converted to

https://hibeamapp.com/auction/d29ya3NwYWNlcy9KREJ2aTZucHJRRjdpMWtlSU0xdy9hdWN0aW9ucy9YYkdFbWJRY3dPOGZzaHlMbjF3RA%253D%253D?h=aW5zdGFncmFtOjcxODkwMjU0ODc4MDQ3NjU

This is wrong because it re-encoded the url, transforming the %3D (url ended for = character) into %253D (double encoded)

In the db, both the Text and HTML variants are correct, so this seems to be a problem with the url component

Dev environment info (please complete/provide the following information):

  • Package version: [email protected]
  • react-native
  • Device/Emulator (android/ios) and OS version: both, iOS 15.5

To Reproduce Steps to reproduce the behavior:

  1. submit a text with this url https://hibeamapp.com/auction/d29ya3NwYWNlcy9KREJ2aTZucHJRRjdpMWtlSU0xdy9hdWN0aW9ucy9YYkdFbWJRY3dPOGZzaHlMbjF3RA%3D%3D?h=aW5zdGFncmFtOjcxODkwMjU0ODc4MDQ3NjU
  2. See the url displayed is wrong
  3. If you tap it, you will be redirected again to a wrong url

Expected behavior To show / be redirected to exactly the same url, without any extra url encoding applied

Screenshots IMG_3395

andreibarabas avatar Jun 17 '22 08:06 andreibarabas

Thanks for reporting this, @andreibarabas. We'll have to look into avoiding double encoding the URL.

madsroskar avatar Jun 21 '22 11:06 madsroskar

proposed solution: remove URL encoding

vanGalilea avatar Aug 16 '22 08:08 vanGalilea

simulator_screenshot_59399566-6532-46F0-9A6E-D38B488C503A Just tried sending it on a newer version of our SDK, and it seems the problem is solved. Can you check @andreibarabas? Thanks 😄

khushal87 avatar Apr 25 '23 07:04 khushal87

I was verifying what @khushal87 said! Closing this issue for now 👍🏻

vanGalilea avatar May 12 '23 07:05 vanGalilea