Improve determination of correct editor for external URLs.

Change-Id: I8e400c30f9632da3ca57ed62b0189b9ff262857a