Links to cross-origin destinations are unsafe

Hi,

Lighthouse report says that I have to add add rel="noopener" or rel="noreferrer" to any external links to improve performance and prevent security vulnerabilities.

Failing Anchors
a.x-author-social
a.x-author-social

(that´s tha author box)

How can I solve it?

Ex. https://mensandbeauty.com/quemar-grasa-abdominal/

Hi Ignacio,

Thanks for reaching out!

This feature will require some customization. We will just give you a piece of code as a starting code. Please add the code in your Pro > Theme Options > JS.

jQuery(document).ready(function( $ ){
	$('.x-author-social').each(function(){
		if ( $(this).attr('target') == '_blank'){
			$(this).attr('rel','noopener');
		}
	})

});

Please note that custom code is outside the scope of our support. Issues that might arise from the use of custom code and further enhancements should be directed to a third-party developer or you can avail One where we can answer questions outside of the features of our theme.

Hope that helps.

Thank you.

Thanks @marc_a.

I have a question? Is it possible to solve this problem without any custom code? I am optimizing speed, and this will affect.

Can the problem be that I had disable jQuery in WordPress?

Hello Ignacio,

Yes, it is possible. You just have to redesign the author box by not using the Author element. You will need to use dynamic content elements in displaying the author details in your custom author section layout.

Hope this makes sense.

Oh wow, you are correct.

I´ll give it a try.

Let us know how it goes,

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.