Skip to content
Sheetwrite

@sheetwrite/core/codec

isSafeExternalHyperlinkfunction

Report a problem

On this page

Validate, but never activate or fetch, an external hyperlink target.

Declaration

function isSafeExternalHyperlink(url: string): boolean

Parameters

url: stringrequired

The link target, such as https://example.com.

Returns

boolean

true only for a bounded https: URL without user name or password, or a mailto: address.