Merge pull request #2898 from rohieb/feature/more-uri-schemes

Highlight and link more URI schemes: about, geo, tel
This commit is contained in:
John McLear 2016-03-26 22:14:38 +08:00
commit 6f2e155668
3 changed files with 4 additions and 3 deletions

View file

@ -193,7 +193,8 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
{
if (href)
{
if(!~href.indexOf("://") && !~href.indexOf("mailto:")) // if the url doesn't include a protocol prefix, assume http
urn_schemes = new RegExp("^(about|geo|mailto|tel):");
if(!~href.indexOf("://") && !urn_schemes.test(href)) // if the url doesn't include a protocol prefix, assume http
{
href = "http://"+href;
}