loopandlearn / LoopFollow

A general Follow app for parents of T1D Loop Users
GNU Affero General Public License v3.0
106 stars 569 forks source link

Sanitize and validate URL input to remove unwanted characters. #286

Closed bjorkert closed 5 months ago

bjorkert commented 5 months ago

This PR addresses an issue where URLs copied and pasted into LoopFollow could fail due to extraneous characters like tabs, spaces or newlines. Changes include:

Implementing a regex-based filter to remove any non-URL appropriate characters. Ensuring all URLs are processed to lowercase.

Impact: These updates improve URL handling robustness, ensuring copied URLs function identically to manually entered ones, thus enhancing user experience and reducing errors.

marionbarker commented 5 months ago

code review looks code. tested by adding / at end of URL and it was removed and by adding $ in the middle of the URL and it was removed.