From an accessibility perspective, the preference would be to always open links within the same window rather than opening them up in a new window.
The reason for this is that some users, especially screen reader users, can get confused or disoriented with the new windows or tabs. If a new window or tab is opened a screen reader user should be notified of this ahead of time. Newer screen readers will alert the user when a link opens a new window, but this only happens after the user clicks on the link. Older screen readers don’t alert users at all. Sighted users with cognitive disabilities may also have difficulty interpreting what just happened when a new tab/window is opened. Then when they try to click on the browser Back button nothing happens, because there is no previous link to go back to in a new window or tab.