Skip to content

Added a better way of detecting when a url does not have a protocol spec...#1963

Merged
marcelklehr merged 1 commit intoether:developfrom
grantwwoodford:allLinksTranslatingToHTTP
Oct 28, 2013
Merged

Added a better way of detecting when a url does not have a protocol spec...#1963
marcelklehr merged 1 commit intoether:developfrom
grantwwoodford:allLinksTranslatingToHTTP

Conversation

@grantwwoodford
Copy link
Copy Markdown
Contributor

This is a fix for Issue #1776 - All links regardless of protocol translate to http:// links

When a protocol is not specified for a link, it is assumed that the protocol is http.
The issue was that the detection for when a protocol is not specified only checked for http. I've updated this to have broader detection.

@marcelklehr
Copy link
Copy Markdown
Contributor

So what happens to things like http://foo.bar/mailto:user/?

@marcelklehr
Copy link
Copy Markdown
Contributor

Ah, no. I think it's alright.

@grantwwoodford
Copy link
Copy Markdown
Contributor Author

I could try do it as a regular expression, something like what is mentioned here:
http://www.webdeveloper.com/forum/showthread.php?233064-RESOLVED-regex-all-URL-protocols

Should I rewrite it?

marcelklehr added a commit that referenced this pull request Oct 28, 2013
Fix #1776 - All links regardless of protocol translate to http:// links
@marcelklehr marcelklehr merged commit 975eae3 into ether:develop Oct 28, 2013
@marcelklehr
Copy link
Copy Markdown
Contributor

works. thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants