Gutenberg Blocks with links that have target="_blank" need rel="noopener"

If you add an toggle option for target="_blank" or have that in your <a> tag then you need to add rel=“noopener” in your <a> tag. If you don’t WP will add it automatically and then your block will get an error the next time you open your post/page because the saved block will not match the content in the post/page.

Hi @jonroc,
Thanks for the heads-up. We’ll look in to how to address this.
Cheers,
Bob

I’m not that keen on adding a magic behavior (something that happens without direct instruction by the user) to the code generated by Pinegrow. In this case, this made sense. So, Pinegrow will automatically add rel=”noopener” to block links if the rel is not set already and if target is set to _blank.

The update is not yet released. Try it now on Pinegrow Live:

1 Like