Page 1 of 1

How to securely open link in new tab with wysiwyg?

Posted: Sun Oct 04, 2020 9:23 pm
by cyrusinteractive
Normally I been using the option to open the link in a new tab "_blank" however after reading this article it shows that there is a security risk with this.

https://medium.com/sedeo/how-to-fix-tar ... 18eba1ce2f

What would be the secure way to open a link in a new tab or new window using WYSIWYG?

- Regards

Re: How to securely open link in new tab with wysiwyg?

Posted: Sun Oct 04, 2020 11:43 pm
by crispy68
The main thing to understand is that, in order for blank-target links to be unsafe, the attacker needs control of the target page in order to execute their script. Otherwise there is no threat and the blank-target link is completely safe and secure. So it’s all about trust: do you 100% trust the pages that you’re linking to? If so, you have absolutely nothing to worry about.

If it will help you sleep better at night you can add the following to your links:

Text Link
Open up the link properties --> click Advanced

Image Link
Right click on the image --> select Object HTML --> Click Inside Anchor

In each case above, add: rel="noopener noreferrer"

Gets a lot trickier when adding to a menu. In those cases, you may have to add it to the published code manually.

Re: How to securely open link in new tab with wysiwyg?

Posted: Mon Oct 05, 2020 12:21 am
by cyrusinteractive
Thanks for this information. Could You give Me an example of a properly formatted url using Your suggestion? Maybe for example a link to this forum homepage so that I can see how it should look?

Thanks!

Re: How to securely open link in new tab with wysiwyg?

Posted: Mon Oct 05, 2020 12:37 am
by crispy68

Code: Select all

<a href="https://www.google.com" target="_blank" rel="noopener noreferrer">This is a link</a>