mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
Merge pull request #2898 from rohieb/feature/more-uri-schemes
Highlight and link more URI schemes: about, geo, tel
This commit is contained in:
commit
6f2e155668
3 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue