Skip to content

Commit 807259e

Browse files
committed
more readable removal of mailto: prefix
1 parent 9144521 commit 807259e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/proto/mailto.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports.check = (link, opts, callback) => {
66
import('node-email-verifier').then((mod) => {
77
const emailValidator = mod.default;
88
const address = link
9-
.substr(7) // strip "mailto:"
9+
.replace(/^mailto:/i, '')
1010
.split('?')[0]; // trim ?subject=blah hfields
1111

1212
/* per RFC6068, the '?' is a reserved delimiter and email addresses containing '?' must be encoded,

0 commit comments

Comments
 (0)