target="_blank" is not working in iframe


Staff member
I'm working on wordpress media library tab. Inside this iframe, I provide a link with target="_blank". I expect this link leads to a new browser tab or window, but it opens the link inside the iframe tab. This is the link:

$view = '<a href='.get_permalink($attach->ID).' target="_blank">'.$attach->post_title.'</a>';

How can I make it go to a new browser window?