robotswingset / narwhal-bugs

Public bug tracker for Narwhal 2
https://narwhal.app
3 stars 0 forks source link

Link posts with '%20' in the URL do not open correctly #37

Open Tumleren opened 3 months ago

Tumleren commented 3 months ago

Describe the bug When a URL in a link post contains a percentage sign '%' the percentage sign is replaced with '%25', breaking the URL

To Reproduce Steps to reproduce the behavior:

  1. Go to this post in Narhwal 2: https://www.reddit.com/r/Denmark/comments/1dnmiot/etnisk_profilering_kvantitativ_analyse/
  2. Open the link in the post
  3. A 404 error is received from the website. The url containing '%20' (https://menneskeret.dk/files/media/document/Etnisk%20profilering%20kvantitativ%20analyse.pdf) has been replaced with a url containing '%2520' (https://menneskeret.dk/files/media/document/Etnisk%2520profilering%2520kvantitativ%2520analyse.pdf)

Expected behavior For the link to open as normal without replacing the percentage signs

Screenshots For video of the above post opening in the official Reddit app, but not in Narwhal, see: https://imgur.com/a/ePFcn9i

For another example, see https://www.reddit.com/r/Denmark/comments/1djdy3b/mobilepay_udruller_ny_funktion/ Post URL: https://nyheder.tv2.dk/penge/2024-06-19-mobilepay-udruller-ny-funktion#:~:text=Det%20vil%20koste%20et%20gebyr,sende%20penge%20over%20nordiske%20gr%C3%A6nser.&text=Det%20er%20fra%20onsdag%20blevet,i%20b%C3%A5de%20Norge%20og%20Finland.&text=Det%20skriver%20selskabet%20Vipps%20Mobilepay,bag%20betalingsappen%2C%20i%20en%20pressemeddelelse. URL opened by Narwhal: https://nyheder.tv2.dk/penge/2024-06-19-mobilepay-udruller-ny-funktion%23:~:text=Det%2520vil%2520koste%2520et%2520gebyr,sende%2520penge%2520over%2520nordiske%2520gr%25C3%25A6nser.&text=Det%2520er%2520fra%2520onsdag%2520blevet,i%2520b%25C3%25A5de%2520Norge%2520og%2520Finland.&text=Det%2520skriver%2520selskabet%2520Vipps%2520Mobilepay,bag%2520betalingsappen%252C%2520i%2520en%2520pressemeddelelse.

Device Information:

Additional context When a URL submitted as a post will not resolve to the correct address, a comment containing the same URL resolves to the correct address. For example, see https://www.reddit.com/r/Tumleren/comments/1do3irv/test/ . The submission will not open in Narwhal while the comment containing the same URL will open.