adding in some tweaks so the dubiously useful function to make links open in a new tab works and doesn't break databases.php