Fixes for bugs 13502 / 13835 / 5871

Use the long form of java.net.URI constructor that quotes the path
component of a URI string containing reserved characters (in the sense
of RFC 2396).

This allows a user to specify an external link with the [[...]] syntax
that contains a space character (for example).

https://bugs.corefiling.com/show_bug.cgi?id=13502