stream-chat-react-native
stream-chat-react-native copied to clipboard
url is modified upon display (and thus the page does not work properly)
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:
- submit a text with this url https://hibeamapp.com/auction/d29ya3NwYWNlcy9KREJ2aTZucHJRRjdpMWtlSU0xdy9hdWN0aW9ucy9YYkdFbWJRY3dPOGZzaHlMbjF3RA%3D%3D?h=aW5zdGFncmFtOjcxODkwMjU0ODc4MDQ3NjU
- See the url displayed is wrong
- 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
Thanks for reporting this, @andreibarabas. We'll have to look into avoiding double encoding the URL.
proposed solution: remove URL encoding
Just tried sending it on a newer version of our SDK, and it seems the problem is solved. Can you check @andreibarabas? Thanks 😄
I was verifying what @khushal87 said! Closing this issue for now 👍🏻