We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d386200 commit f58e7e7Copy full SHA for f58e7e7
1 file changed
lib/url.js
@@ -267,7 +267,8 @@ export function isMisleadingLink (text, href) {
267
268
try {
269
const textUrl = new URL(text)
270
- if (textUrl.origin !== hrefUrl.origin) {
+ // if textUrl.origin has value 'null', it means the text is not trying to be a URL
271
+ if (textUrl.origin !== 'null' && textUrl.origin !== hrefUrl.origin) {
272
misleading = true
273
}
274
} catch {}
0 commit comments