Open external links in new tab

Hi,
We'd like to add a code snippet to our plugin, that makes all external links open as _blank.
Do you have it around?
Thanks!