Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use String.prototype.includes for URL string #2

Open
1 task
azu opened this issue Dec 13, 2022 · 1 comment
Open
1 task

Do not use String.prototype.includes for URL string #2

azu opened this issue Dec 13, 2022 · 1 comment

Comments

@azu
Copy link
Owner

azu commented Dec 13, 2022

includes method is not suitable for almost cases in URL manipulation.
Instead of it, you should use === instead of includes.

  • relative link detection
  • subdomain detection
  • same origin detection

TODO

  • Need Examples
@azu
Copy link
Owner Author

azu commented Aug 17, 2023

@azu azu changed the title Do not use String.prototype.includes for URL Do not use String.prototype.includes for URL string Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant