2021年1月2日星期六

I still get SECURITY RISK error even though I have "noopener noreferrer" on my tags

React app, MERN stack.

My component has three tags that I want to open new tabs with:

<a    href="https://www.facebook.com/"    target="_blank"    ref="noopener noreferrer"    style={styles.link}  >  <a    href="https://www.instagram.com/"    target="_blank"    ref="noopener noreferrer"    style={styles.link}  >  <a    href="https://www.youtube.com/"    target="_blank"    ref="noopener noreferrer"    style={styles.link}  >  

Even though I have ref="noopener noreferrer", I'm still getting Using target="_blank" without rel="noreferrer" is a security risk: in the console.

Is this cause for concern?


Separate but related console warning I'm getting:

Warning: A string ref, "noopener noreferrer", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided.

Is THIS cause for concern?!?

Thanks all.

https://stackoverflow.com/questions/65545715/i-still-get-security-risk-error-even-though-i-have-noopener-noreferrer-on-my January 03, 2021 at 09:03AM

没有评论:

发表评论