Fix crash when rendering markdown

When rendering a link, don't crash if the uri is not valid.