Memmy-App / memmy

An Apollo inspired open-source iOS and Android client for Lemmy built with React-Native. Find us on the App Store and Google Play!
GNU Affero General Public License v3.0
547 stars 58 forks source link

fix #989: url escape issue and better url validation #1014

Open flx-sta opened 11 months ago

flx-sta commented 11 months ago

PR Creator Checklist

Ensure you've checked the following before submitting your PR:

Summary

Fixes an issue with links not being opened properly. Adjust URL check to use new URL() with try catch instead of a regex pattern

Screenshots

https://github.com/Memmy-App/memmy/assets/50131232/c71c0c41-faf2-4456-81e5-3334b54bb741

Test Plan

  1. Open the App
  2. Go find a link with a special character (find one in the original issue #989)
  3. open the link: It should open properly