Just for others that see this post, as I am sure you are already aware, the noreferrer is added as a security fix for IE and Edge browsers and a few others, that do not support the rel="noopener" security fix for links that are opened in a new tab.
To remove the noreferrer, it is still a preg_replace. I added this to functions.php (backing it up first).
//This code removes noreferrer from your new or updated posts
add_filter( 'wp_targeted_link_rel', 'my_targeted_link_rel_remove_noreferrer');
function my_targeted_link_rel_remove_noreferrer( $rel_values ) {
return preg_replace( '/noreferrer\s*/i', '', $rel_values );
}
The first time I was testing, I had to add a priority to the filter call (below code) to make it work, not sure that "999" was really necessary, but now when I test it seems to work without it.
//This code removes noreferrer from your new or updated posts
add_filter( 'wp_targeted_link_rel', 'my_targeted_link_rel_remove_noreferrer', 999);
function my_targeted_link_rel_remove_noreferrer( $rel_values ) {
return preg_replace( '/noreferrer\s*/i', '', $rel_values );
}
Here is the link to the full post.
https://wpbloggerassist.com/remove-noreferrer-in-gutenberg-from-the-latest-wordpress-update/
Editing to add I found another code here:
// from: https://tinygod.pt/gutenberg-adds-noopener-noreferrer-to-links/
function my_links_control( $rel, $link ) {
return false;
}
add_filter( 'wp_targeted_link_rel', 'my_links_control', 10, 2 );
NOTE: This does not remove existing noreferrer links, you still need to go to posts, remove the "noreferrer" text and update.
This third code will not auto-add any rel attributes. So it is up to you to make sure to add the rel="noopener" manually.
noreferrer
removed out of curiosity?createLinkFormat
in javascript, the solution here is almost certainly going to either be a JS one, or something that runs onthe_content
, but I don't see why you would want to remove it, some context on your question as to why would be super helpful and better inform any answers you might get