Skip to content

Commit

Permalink
Fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Aug 3, 2023
1 parent 0df4b5d commit 21f8f6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2472,7 +2472,7 @@ private function remove_disallowed_siblings( DOMElement $node, $spec_name ) {

$prev_sibling = $node->previousSibling;
while ( null !== $prev_sibling ) {
if ( ! ( $prev_sibling instanceof Element ) ) {
if ( $prev_sibling instanceof Element ) {
$this->remove_invalid_child(
$prev_sibling,
[
Expand All @@ -2487,7 +2487,7 @@ private function remove_disallowed_siblings( DOMElement $node, $spec_name ) {

$next_sibling = $node->nextSibling;
while ( null !== $next_sibling ) {
if ( ! ( $next_sibling instanceof Element ) ) {
if ( $next_sibling instanceof Element ) {
$this->remove_invalid_child(
$next_sibling,
[
Expand Down

0 comments on commit 21f8f6f

Please sign in to comment.