link using "a" tag with target _blank in MVC

Olivier Voutat 96 Reputation points
2023-05-11T13:00:44.5966667+00:00

I'm trying to add a link in our MVC web site to an external website and I want to open it in a new tab.

Unfortunately, when I add target="_blank" to my link, it stops working.

Without it, it correctly opens in the same tab.

In a new created MVC app, no problem either.

Please, anyone has an idea what could be blocking this ?

thanks in advance.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,419 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Olivier Voutat 96 Reputation points
    2023-05-11T14:57:34.24+00:00

    Ok, the console message was not perfectly clear but I found it.

    We have CSP rules, and I had to add 'allow-popups' to allow blank target...

    Only a day and a half to find it...

    0 comments No comments