We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16b3983 commit 92a1c32Copy full SHA for 92a1c32
includes/embeds/class-amp-base-embed-handler.php
@@ -137,9 +137,6 @@ static function ( DOMNode $child ) {
137
*/
138
protected function unwrap_p_element( DOMElement $node ) {
139
$parent_node = $node->parentNode;
140
- while ( $parent_node && ! ( $parent_node instanceof DOMElement ) ) {
141
- $parent_node = $parent_node->parentNode;
142
- }
143
144
if ( $parent_node instanceof DOMElement && 'p' === $parent_node->tagName && false === $parent_node->hasAttributes() ) {
145
$child_element_count = count( $this->get_child_elements( $parent_node ) );
0 commit comments