diff --git a/__tests__/URL-test.js b/__tests__/URL-test.js
index c5f01be5..1474663b 100644
--- a/__tests__/URL-test.js
+++ b/__tests__/URL-test.js
@@ -19,12 +19,6 @@ describe('Strict URL validation', () => {
expect(regexToTest.test('https://google.com:65536')).toBeFalsy();
expect(regexToTest.test('smtp://google.com')).toBeFalsy();
});
-
- it('should not match urls inside tags', () => {
- const regexToTest = new RegExp(`^${URL_REGEX_WITH_REQUIRED_PROTOCOL}$`, 'i');
- expect(regexToTest.test('http://google.com/
')).toBeFalsy();
- expect(regexToTest.test('
http://google.com/')).toBeFalsy(); - }); }); describe('Optional protocol for URL', () => { diff --git a/lib/Url.js b/lib/Url.js index 9d2a9108..5b89696c 100644 --- a/lib/Url.js +++ b/lib/Url.js @@ -2,8 +2,7 @@ import TLD_REGEX from './tlds'; const ALLOWED_PORTS = '([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])'; const URL_PROTOCOL_REGEX = '((ht|f)tps?:\\/\\/)'; -const URL_WEBSITE_REGEX = `${URL_PROTOCOL_REGEX}?((?:www\\.)?[a-z0-9](?=(?