Skip to content

Rename 'isSafeURL' for 'isValidURL'

Eduardo Sanz García requested to merge eduardosanz/rename-valid-url into master

What does this MR do and why?

Rename isSafeURL for isValidURL

isSafeURL doesn't check if a URL is safe (harmful or malicious). It checks if the URL has the right format and allowed protocols. Internally, the correct URL format is validated using the URL constructor, which raises an Invalid URL TypeError. Hence, the name isValidURL seems to be more adequate.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

N/A

How to set up and validate locally

N/A

Edited by Eduardo Sanz García

Merge request reports