These should be fairly bulletproof though, since URL specification doesn't allow unencoded # character anywhere, including notably the <password> section of <protocol>://<user>:<password>@<host>. But where there's fragment, soon will come other parts of the URL.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
JavaScript
Second parameter to
split
means it will stop looking after the first match, and never construct a second string value.Rust
look at it go!
Disclaimer:
In real life, please use developer.mozilla.org/docs/Web/API... or docs.rs/url/ respectively.
These should be fairly bulletproof though, since URL specification doesn't allow unencoded
#
character anywhere, including notably the<password>
section of<protocol>://<user>:<password>@<host>
. But where there's fragment, soon will come other parts of the URL.