You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -827,7 +828,8 @@ public function test_reply_block_not_transformed_when_not_first_block() {
827
828
$content = $object->get_content();
828
829
829
830
// Assert that the reply block was not transformed into a mention link.
830
-
$this->assertStringContainsString( '<div class="activitypub-reply-block wp-block-activitypub-reply" aria-label="Reply" data-in-reply-to="https://example.com/posts/123"><p><a title="This post is a response to the referenced content." aria-label="This post is a response to the referenced content." href="https://example.com/posts/123" class="u-in-reply-to" target="_blank">↬example.com/posts/123</a></p></div>', $content );
831
+
// Note: clean_html() strips class/aria-label/data-* from <div> but preserves class/title on <a>.
832
+
$this->assertStringContainsString( '<div><p><a title="This post is a response to the referenced content." href="https://example.com/posts/123" class="u-in-reply-to" target="_blank">↬example.com/posts/123</a></p></div>', $content );
831
833
}
832
834
833
835
/**
@@ -882,10 +884,12 @@ public function test_multiple_reply_blocks_only_first_becomes_mention() {
882
884
$content = $object->get_content();
883
885
884
886
// Assert that the first reply block was transformed into a mention link.
// Assert that the second reply block was NOT transformed into a mention link (should remain as regular reply block).
888
-
$this->assertStringContainsString( '<div class="activitypub-reply-block wp-block-activitypub-reply" aria-label="Reply" data-in-reply-to="https://other.site/posts/456"><p><a title="This post is a response to the referenced content." aria-label="This post is a response to the referenced content." href="https://other.site/posts/456" class="u-in-reply-to" target="_blank">↬other.site/posts/456</a></p></div>', $content );
891
+
// Note: clean_html() strips class/aria-label/data-* from <div> but preserves class/title on <a>.
892
+
$this->assertStringContainsString( '<div><p><a title="This post is a response to the referenced content." href="https://other.site/posts/456" class="u-in-reply-to" target="_blank">↬other.site/posts/456</a></p></div>', $content );
0 commit comments