diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index a0438e9c53..5bd10e1855 100644
--- a/src/wp-includes/formatting.php
+++ b/src/wp-includes/formatting.php
@@ -3054,7 +3054,8 @@ function wp_targeted_link_rel( $text ) {
 function wp_targeted_link_rel_callback( $matches ) {
 	$link_html = $matches[1];
 	$rel_match = array();
-
+	$rel = 'noopener noreferrer';
+	
 	/**
 	 * Filters the rel values that are added to links with `target` attribute.
 	 *
@@ -3063,7 +3064,10 @@ function wp_targeted_link_rel_callback( $matches ) {
 	 * @param string The rel values.
 	 * @param string $link_html The matched content of the link tag including all HTML attributes.
 	 */
-	$rel = apply_filters( 'wp_targeted_link_rel', 'noopener noreferrer', $link_html );
+	$targeted_link_rel = apply_filters( 'wp_targeted_link_rel', $rel, $link_html );
+	if( $targeted_link_rel ){
+		$rel = $targeted_link_rel;
+	}
 
 	// Value with delimiters, spaces around are optional.
 	$attr_regex = '|rel\s*=\s*?(\\\\{0,1}["\'])(.*?)\\1|i';
diff --git a/tests/phpunit/tests/formatting/WPTargetedLinkRel.php b/tests/phpunit/tests/formatting/WPTargetedLinkRel.php
index 49c843ec2c..832b82bef7 100644
--- a/tests/phpunit/tests/formatting/WPTargetedLinkRel.php
+++ b/tests/phpunit/tests/formatting/WPTargetedLinkRel.php
@@ -71,4 +71,17 @@ class Tests_Targeted_Link_Rel extends WP_UnitTestCase {
 		$expected = '<p>Links: <a href="/" target="_blank" rel="noopener noreferrer">Change me</a> <a href="/">Do not change me</a></p>';
 		$this->assertEquals( $expected, wp_targeted_link_rel( $content ) );
 	}
+	
+	public function test_filter_non_empty_value() {
+		add_filter('wp_targeted_link_rel', array( $this, 'filter_empty_targeted_link_rel' ) );
+		$content  = '<p>Links: <a href="/" target="_blank">No rel</a></p>';
+		$expected = '<p>Links: <a href="/" target="_blank" rel="noopener noreferrer">No rel</a></p>';
+		$this->assertEquals( $expected, wp_targeted_link_rel( $content ) );
+		remove_filter( 'wp_targeted_link_rel', array( $this, 'filter_empty_targeted_link_rel' ) );
+	}
+	
+	public function filter_empty_targeted_link_rel( $value ) {
+		return '';
+	}
+	
 }
