showdown icon indicating copy to clipboard operation
showdown copied to clipboard

Internal Domain Website URL's are not being converted to links.

Open Johns3n opened this issue 6 years ago • 5 comments

Vanilla flavour doesn't render internal domain URL's into links and neither does Github flavour even though in this Github markdown editor they do!

URL Works?
www.test.net works!
http://test.net works!
http://www.test.net works!
https://test.net works!
https://www.test.net works!
https://www.test.net/chat works!
https://www.test.net/chat/ works!
https://www.test.net/chat?test=true works!
https://www.test.net/chat/?test=true works!
http://test does NOT work!
http://test/chat does NOT work!
http://test/chat/ does NOT work!
http://test/chat?test=true does NOT work!
http://test/chat/?test=true does NOT work!

Johns3n avatar Jan 31 '19 14:01 Johns3n

@Johns3n You mean relative links in autolinks?

tivie avatar Feb 08 '19 17:02 tivie

Don't know if i would call them relative in regards to them having a http://

What I mean is links without top level domain name. Such as my examples above.

http://localhost/something/ http://localhost?path=to-somewhere

Johns3n avatar Feb 08 '19 17:02 Johns3n

@tivie - Any news on this? I need this functionality as i'm implementing it in a Intranet browser app, which needs to support the no TLD autolinks.

Johns3n avatar Mar 04 '19 12:03 Johns3n

@tivie - Alot of months later and I haven't gotten a answer about wether this is something that will be looked into or not? Because we need to know if we should look into other Markdown helpers or it will be integrated :)

Johns3n avatar Sep 11 '19 09:09 Johns3n

Vanilla flavour doesn't render internal domain URL's into links and neither does Github flavour even though in this Github markdown editor they do!

URL Works? www.test.net works! http://test.net works! http://www.test.net works! https://test.net works! https://www.test.net works! https://www.test.net/chat works! https://www.test.net/chat/ works! https://www.test.net/chat?test=true works! https://www.test.net/chat/?test=true works! http://test does NOT work! http://test/chat does NOT work! http://test/chat/ does NOT work! http://test/chat?test=true does NOT work! http://test/chat/?test=true does NOT work!

This is due to regex

   var urlRgx  = /<(((?:https?|ftp):\/\/|www\.)[^'">\s]+)>/gi;

used to identify links that is being used

Rafi993 avatar Jun 09 '20 12:06 Rafi993