diff --git a/includes/class-convertkit-broadcasts-importer.php b/includes/class-convertkit-broadcasts-importer.php index 1647c896..8cb0f54e 100644 --- a/includes/class-convertkit-broadcasts-importer.php +++ b/includes/class-convertkit-broadcasts-importer.php @@ -577,6 +577,8 @@ private function permitted_html_tags( $disable_styles = false ) { 's', 'a', 'img', + 'figure', + 'figcaption', 'br', 'style', // Deliberate; we'll use DOMDocument to remove inline styles and their contents. ); diff --git a/tests/wpunit/BroadcastsImportTest.php b/tests/wpunit/BroadcastsImportTest.php index c1744c74..9cce10c7 100644 --- a/tests/wpunit/BroadcastsImportTest.php +++ b/tests/wpunit/BroadcastsImportTest.php @@ -319,6 +319,12 @@ private function assertImportValid($post) // Confirm tracking image has been removed. $this->assertStringNotContainsString('', $post->post_content); + // Confirm images included retain their
and
elements. + $this->assertStringContainsString('post_content); + $this->assertStringContainsString('post_content); + $this->assertStringContainsString('A Sample Caption
', $post->post_content); + $this->assertStringContainsString('
', $post->post_content); + // Confirm unsubscribe link section has been removed. $this->assertStringNotContainsString('
post_content);