First off, great project! Noticed an issue and attempted a fix here.
The following is a valid mailto link that prefills the subject line:
mailto:yousef@amar.io?Subject=Hello%2C%20Yousef!
Indielogin thinks this is my email:
yousef@amar.io?Subject=Hello%2C%20Yousef!
Which is not the case.
I therefore tweaked the regex such that:
mailto link
$match[1] before
$match[1] after
mailto:yousef@amar.io?Subject=Hello%2C%20Yousef!
yousef@amar.io?Subject=Hello%2C%20Yousef!
yousef@amar.io
mailto:yousef@amar.io
yousef@amar.io
yousef@amar.io
mailto:foo@bar
foo@bar
foo@bar
mailto:foo@
foo@
mailto:@bar
@bar
mailto:foo
foo
mailto:@
@
mailto:
You'll notice I also added a tiny bit that checks if it actually looks like an email also (*@*) but that's not strictly necessary. To remove that, we can just remove \@.+ from the regex.
First off, great project! Noticed an issue and attempted a fix here.
The following is a valid mailto link that prefills the subject line:
Indielogin thinks this is my email:
Which is not the case.
I therefore tweaked the regex such that:
You'll notice I also added a tiny bit that checks if it actually looks like an email also (*@*) but that's not strictly necessary. To remove that, we can just remove
\@.+
from the regex.