madebymany/sir-trevor-js — pull request #143 by olvado (2013-12-12 15:43:47+00:00)
Title: extend the link_regex to allow mailto: links

At the moment only http/https/ftp links are allowed when creating a link in the text-block. This extends the regex used to test the link to allow mailto: links.

Accepts the following:
ftp://255.255.255.255 true
http://www.domain.com true
http://domain.com true
http://domain.co.uk true
https://www.domain.com true
https://domain.com true
mailto:user@domain.com true
mailto:user.name@domain.com true
http://localhost true

Does not accept the following:
user@domain.com/dir?param=value false
256.256.256.256 false
ftps://sub.domain.com/.ext false
domain.com/?param=value false
domain.com/dir/page.ext?param=value¶m=value false
mailto://asdasd@asdasd.com false
mailto:asdasdasdasd false
mailto://asdasd.com false