diff --git a/packages/block-editor/src/components/link-control/is-url-like.js b/packages/block-editor/src/components/link-control/is-url-like.js index 5edbcce4329796..58861b71b837b8 100644 --- a/packages/block-editor/src/components/link-control/is-url-like.js +++ b/packages/block-editor/src/components/link-control/is-url-like.js @@ -27,14 +27,10 @@ export default function isURLLike( val ) { const mayBeTLD = hasPossibleTLD( val ); const isWWW = val?.startsWith( 'www.' ); - const isHTTPProtocol = /^(http|https)/.test( val ) && protocolIsValid; - const isMailTo = val?.startsWith( 'mailto:' ) && protocolIsValid; - const isTel = val?.startsWith( 'tel:' ) && protocolIsValid; + const isInternal = val?.startsWith( '#' ) && isValidFragment( val ); - return ( - isHTTPProtocol || isWWW || isMailTo || isTel || isInternal || mayBeTLD - ); + return protocolIsValid || isWWW || isInternal || mayBeTLD; } /**