ProtonMail / WebClients

Monorepo hosting the proton web clients
GNU General Public License v3.0
4.24k stars 538 forks source link

Why remove trailing slashes in link confirmation modal #296

Closed tholam closed 1 year ago

tholam commented 1 year ago

We are happy to answer your questions about the code or discuss technical ideas.

Please complete the following checklist (by adding [x]):


I noticed that the link confirmation modal removes trailing slashes on the web client and not ios.

https://github.com/ProtonMail/WebClients/blob/51742625834d3bd0d10fe0c7e76b8739a59c6b9f/packages/components/hooks/useLinkHandler.tsx#L141 https://github.com/ProtonMail/WebClients/blob/51742625834d3bd0d10fe0c7e76b8739a59c6b9f/packages/components/helpers/url.ts#L63

I was wondering why this change was made as it breaks some urls.

For example southwest emails contain urls like this https://t.iluv.southwest.com/r/?<query params> but the link confirmation removes that trailing slash https://t.iluv.southwest.com/r?<query params> which breaks the routing.

mmso commented 1 year ago

Thanks for the report. Should be fixed now.