About Links with target=_blank

If you need to use a link that should open in a new window with target="_blank", always add rel="noopener noreferrer" to it:

1
2
3
<a href="{{ url }}" target="_blank" rel="noopener noreferrer">
    {{ title }}
</a>

Otherwise the linked website can modify your website's window object by JavaScript.

Tips and Tricks Development Security Django 4.2 Django 3.2 Django 2.2 JavaScript HTML5