allow newlines when detecting links, strip them out of generated href

This one feels a little iffy but I needed it for my project. Basically, the aim is to sanely ignore / handle new-lines when detecting links. The easiest first-step was to handle 'em in the url path.

Regex is hurty :-(