eslint-plugin-react-security icon indicating copy to clipboard operation
eslint-plugin-react-security copied to clipboard

no-javascript-urls for relative URLs

Open diogoalex01 opened this issue 4 years ago • 0 comments

I was using this linter and I noticed that the no-javascript-urls rule, when linting relative URLs, on situations such as:

<a href="/whatever">Whatever</a>

The following error was thrown:

TypeError [ERR_INVALID_URL]: Invalid URL

I believe it has to do with the URL() constructor used requiring the base URL when the URL is relative.

diogoalex01 avatar Feb 03 '21 19:02 diogoalex01