0

I just came across this answer, which included a note that the URL they tried to use wasn't being recognized by the markdown engine.

I tried swapping the hyphens for %2D and suddenly the URL was recognized. When I clicked the link to confirm it worked properly, I noticed Wikipedia was performing a redirect from http://en.wikipedia.org/wiki/Model-view-controller gets redirected to http://en.wikipedia.org/wiki/Model–view–controller.

The difference is subtle, but the "proper" Wikipedia URL uses an ndash instead of a hyphen. As you can see from the links above, this is a breaking character for Markdown URLs.

I know that in this case switching with hyphens works, but should Markdown be updated to allow this character (and probably the mdash as well, for good measure - any others?) in case there are situations where it doesn't?

1 Answer 1

2

Solution:

  1. press ctrl+l (or click the toolbar hyperlink button)

  2. paste URL

  3. press enter

result:

[Model-View-Controller on Wikipedia][1]

  [1]: http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
4
  • To be fair, this auto-encoding wasn't available in November of 2009 when the original post was made.
    – balpha StaffMod
    Commented Mar 20, 2011 at 7:13
  • Firefox has been my main browser for six years, yet I've never noticed this. Seems to only work when you paste the whole URL, not when you just replace a portion like I was doing last night. Thanks Lord President Atwood.
    – anon
    Commented Mar 20, 2011 at 17:15
  • @jesse I prefer Galactic President Superstar McAwesomeville youtube.com/watch?v=Y5RQNBFKK30 Commented Mar 20, 2011 at 21:28
  • Duly noted, though I took Lord President from Doctor Who, which is clearly superior to (the non-NPH parts of) HIMYM.
    – anon
    Commented Mar 21, 2011 at 1:41

You must log in to answer this question.