-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
isURL should have an option to not validate by length #1396
Copy link
Copy link
Closed
Labels
Description
Describe the bug
The isURL function has a hardcoded validation:
if (!url || url.length >= 2083 || /[\s<>]/.test(url)) {
return false;
}
The URL length should be an option to overwrite the length or to skip this validation.
Additional context
validator version: 13.1.1
2083 is the maximum URL length for IE, but not for the rest of the browsers and it isn't part of the RFC:
https://support.microsoft.com/en-us/help/208427/maximum-url-length-is-2-083-characters-in-internet-explorer
https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
https://chromium.googlesource.com/chromium/src/+/master/docs/security/url_display_guidelines/url_display_guidelines.md#:~:text=URL%20Length,-In%20general%2C%20the&text=Chrome%20limits%20URLs%20to%20a,is%20used%20on%20VR%20platforms.
Reactions are currently unavailable