diff --git a/inc/namespace.php b/inc/namespace.php index 2c95fb2..b89a522 100644 --- a/inc/namespace.php +++ b/inc/namespace.php @@ -145,13 +145,17 @@ function enable_lightbox_for_images( string $content ): string { $link->setAttribute( 'data-group', $image_id ); } - // Strip the XML tag and placeholders as it's only used for the internal encoding. + // Strip XML tag, internal encoding placeholders and stray end tags of void elements unknown to libxml2. $document_html = trim( str_replace( [ '', '', '', + '', + '', + '', + '', ], '', (string) $document->saveHTML()