diff --git bp-activity/bp-activity-filters.php bp-activity/bp-activity-filters.php
index 603924f..f84873f 100644
--- bp-activity/bp-activity-filters.php
+++ bp-activity/bp-activity-filters.php
@@ -220,11 +220,43 @@ function bp_activity_at_name_filter( $content, $activity_id = 0 ) {
 	if ( empty( $usernames ) )
 		return $content;

+	// hide username content inside tags
+	$replace_count = 0;
+	$replacements = array();
+	foreach ( $usernames as $username ) {
+		// prevent @ name linking in opening a tags
+		preg_match_all( '/(<a[^>]+' . $username . '[^>]+>)/', $content, $tag_matches );
+		if ( !empty( $tag_matches[1] ) ) {
+			foreach ( $tag_matches[1] as $replacement ) {
+				$replacements[ '#BPAN' . $replace_count ] = $replacement;
+				$content = str_replace( $replacement, '#BPAN' . $replace_count, $content );
+				$replace_count++;
+			}
+		}
+
+		// prevent @ name linking inside a tags
+		preg_match_all( '/(<a[^>]+>.*?(?!<\/a>)@' . $username . '.*?<\/a>)/', $content, $content_matches );
+		if ( !empty( $content_matches[1] ) ) {
+			foreach ( $content_matches[1] as $replacement ) {
+				$replacements[ '#BPAN' . $replace_count ] = $replacement;
+				$content = str_replace( $replacement, '#BPAN' . $replace_count, $content );
+				$replace_count++;
+			}
+		}
+	}
+
 	// Linkify the mentions with the username
 	foreach( (array) $usernames as $user_id => $username ) {
 		$content = preg_replace( '/(@' . $username . '\b)/', "<a href='" . bp_core_get_user_domain( $user_id ) . "' rel='nofollow'>@$username</a>", $content );
 	}

+	// put everything back
+	if ( ! empty( $replacements ) ) {
+		foreach ( $replacements as $placeholder => $original ) {
+			$content = str_replace( $placeholder, $original, $content );
+		}
+	}
+
 	// Return the content
 	return $content;
 }
