Sanitize URIs for when dropped from external browser

See https://github.com/bndtools/bnd/pull/744 for same issue but on bndlib side.
I updated the other pull, this one is correct.