Permalink
Browse files

Now accepting all valid email addresses in automatic links.

  • Loading branch information...
1 parent e5a7c78 commit 9b21cc6adf394b3ad6d5da2b786a53d6bf00c73d @michelf committed Jan 1, 2009
Showing with 10 additions and 2 deletions.
  1. +10 −2 markdown.php
View
@@ -1411,9 +1411,17 @@ function doAutoLinks($text) {
<
(?:mailto:)?
(
- [-.\w\x80-\xFF]+
+ (?:
+ [-!#$%&\'*+/=?^_`.{|}~\w\x80-\xFF]+
+ |
+ ".*?"
+ )
\@
- [-a-z0-9\x80-\xFF]+(\.[-a-z0-9\x80-\xFF]+)*\.[a-z]+
+ (?:
+ [-a-z0-9\x80-\xFF]+(\.[-a-z0-9\x80-\xFF]+)*\.[a-z]+
+ |
+ \[[\d.a-fA-F:]+\] # IPv4 & IPv6
+ )
)
>
}xi',

0 comments on commit 9b21cc6

Please sign in to comment.