Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MD links should automatically add scheme #57

Closed
caseywatts opened this issue Feb 28, 2013 · 3 comments
Closed

MD links should automatically add scheme #57

caseywatts opened this issue Feb 28, 2013 · 3 comments

Comments

@caseywatts
Copy link

Links without an http:// prefix aren't read correctly in Apple Mail. It tries to use the x-msg protocol to open them instead of a web browser, which doesn't work.

I believe GMail normally corrects for this by prepending links with http:// but markdown-here avoids that fix.

See also:
http://stackoverflow.com/questions/11033342/php-mail-function-prepends-x-msg-to-all-links

@adam-p
Copy link
Owner

adam-p commented Mar 10, 2013

I think I see what you mean. I'll detail some reproduction scenarios...

In Gmail, without using Markdown Here, http:// will automatically be prepended in these cases:

  • You include some plain text that looks like a link without the scheme; like: www.example.com/index.html.
    • Prepending happens at send time. It does not appear in the text/plain alternative.
  • You create a formatted link but don't specify the scheme.
    • Prepending happens when the link is formatted. It does appear in the text/plain alternative.

In Gmail-with-MDH:

  • If you include some plain text that looks like a link without the scheme -- like www.example.com/index.html -- it won't get picked up for MD auto-linking and Gmail will take over and prepend http://.
  • If you specify a MD link without the scheme -- like [Example](www.example.com/index.html) -- http:// will not get automatically prepended.

Recipient client behaviour for schema-less link:

  • Apple Mail: The x-msg thing.
  • Gmail and Outlook.com: No problem. Quietly prepends http when opening the link.
  • Yahoo: Looks like a link, but you can't click it. There's not even a hover-hand-cursor.
  • Thunderbird: Clicking the link doesn't do anything.

I'm going to change the title of this bug.

@adam-p
Copy link
Owner

adam-p commented Jun 11, 2013

Fixed in rev a6ce210

@adam-p
Copy link
Owner

adam-p commented Aug 30, 2013

For future reference (I'm pretending I'll see this again):

This feature/fix makes a lot of sense for in an email environment, where relative links make no sense, and where the writer doesn't control the scheme at the time the reader views the rendered result.

However, it does not make sense for more web-page-like uses (like blog posts), where the writer might want/expect relative links or to leave the scheme blank so that it matches the scheme that the reader is using to view the site.

jfx2006 added a commit to jfx2006/markdown-here that referenced this issue Jul 23, 2023
jfx2006 added a commit to jfx2006/markdown-here that referenced this issue Nov 9, 2023
  adam-p#57 (comment)

  This feature/fix makes a lot of sense for in an email environment,
  where relative links make no sense, and where the writer doesn't control
  the scheme at the time the reader views the rendered result.

  However, it does not make sense for more web-page-like uses (like blog posts),
  where the writer might want/expect relative links or to leave the scheme blank
  so that it matches the scheme that the reader is using to view the site.
jfx2006 added a commit to jfx2006/markdown-here that referenced this issue Aug 4, 2024
jfx2006 added a commit to jfx2006/markdown-here that referenced this issue Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants