Checks whether a URI is safe to use as a link href. Allows the http, https, mailto
and tel protocols, as well as hash-links, absolute paths and relative URLs. Anything with
another protocol (javascript:, data:, vbscript: and so on) is considered unsafe.
Parameters
uri: string
The URI to check
Returns boolean
true if the URI looks safe to link to, false otherwise
Checks whether a URI is safe to use as a link
href. Allows thehttp,https,mailtoandtelprotocols, as well as hash-links, absolute paths and relative URLs. Anything with another protocol (javascript:,data:,vbscript:and so on) is considered unsafe.