We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59c507f commit 4840dd1Copy full SHA for 4840dd1
packages/block-editor/src/components/link-control/is-url-like.js
@@ -27,14 +27,10 @@ export default function isURLLike( val ) {
27
const mayBeTLD = hasPossibleTLD( val );
28
29
const isWWW = val?.startsWith( 'www.' );
30
- const isHTTPProtocol = /^(http|https)/.test( val ) && protocolIsValid;
31
- const isMailTo = val?.startsWith( 'mailto:' ) && protocolIsValid;
32
- const isTel = val?.startsWith( 'tel:' ) && protocolIsValid;
+
33
const isInternal = val?.startsWith( '#' ) && isValidFragment( val );
34
35
- return (
36
- isHTTPProtocol || isWWW || isMailTo || isTel || isInternal || mayBeTLD
37
- );
+ return protocolIsValid || isWWW || isInternal || mayBeTLD;
38
}
39
40
/**
0 commit comments