diff --git a/src/Dom/Document.php b/src/Dom/Document.php index d65870279a8..63afce82c97 100644 --- a/src/Dom/Document.php +++ b/src/Dom/Document.php @@ -379,7 +379,7 @@ private function normalize_document_structure( $content ) { if ( ! preg_match( self::HTML_STRUCTURE_BODY_END_TAG, $content, $matches ) ) { // Only
missing. // @todo This is an expensive regex operation, look into further optimization. - $content = preg_replace( self::HTML_STRUCTURE_HEAD_TAG, '$0', $content, 1 ); + $content = preg_replace( self::HTML_STRUCTURE_HEAD_TAG, '$0', $content, 1 ); $content .= ''; } } diff --git a/tests/php/test-class-amp-dom-document.php b/tests/php/test-class-amp-dom-document.php index 2aaca141feb..ac04a9cd6f8 100644 --- a/tests/php/test-class-amp-dom-document.php +++ b/tests/php/test-class-amp-dom-document.php @@ -172,8 +172,8 @@ public function assertEqualMarkup( $expected, $actual ) { * @covers \Amp\AmpWP\Dom\Document::convert_amp_bind_attributes() */ public function test_amp_bind_conversion() { - $original = '