Skip to main content
2 of 8
added 93 characters in body
Schwern
  • 390
  • 3
  • 10

URLs wrapped in <> are not parsing correctly in comments

In the comments on StackOverflow, http://en.wikipedia.org/wiki/Inotify was misparsed to include the trailing angle bracket. Also there was a semi-colon after it for some reason. See my comment below for an example.

In RFC 3986 Appendix C. Delimiting a URI in Context, three ways are suggested to indicate that a bit of text is a URL.

  1. Angle brackets like http://en.wikipedia.org/wiki/Inotify
  2. Quotes like "http://en.wikipedia.org/wiki/Inotify"
  3. Whitespace like http://en.wikipedia.org/wiki/Inotify

Angle brackets are "especially recommended".

Markdown syntax also automatically links angle brackets.

Thanks for looking. I know free-form URL parsing is a pain, I maintain a library myself.

Schwern
  • 390
  • 3
  • 10