Skip to content

Commit 46af172

Browse files
committed
Fix implementation detail, move by one not two dashes
1 parent 5900185 commit 46af172

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/wp-includes/html-api/class-wp-html-tag-processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ private function parse_next_tag() {
10721072
continue 2;
10731073
}
10741074

1075-
$closer_at = $closer_at + 2;
1075+
$closer_at = $closer_at + 1;
10761076
}
10771077
}
10781078

tests/phpunit/tests/html-api/wpHtmlTagProcessor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,6 +1846,7 @@ public function data_abruptly_closed_empty_comments() {
18461846
'Empty comment with four dashes' => array( '<hr><!----><hr id=after>' ),
18471847
'Empty comment with four dashes, improperly closed' => array( '<hr><!----!><hr id=after>--><hr id=final>' ),
18481848
'Comment with four dashes, improperly closed twice' => array( '<hr><!----!><hr id=after>--!><hr id=final>' ),
1849+
'Comment with almost-closer inside' => array( '<hr><!-- ---!><hr id=after>--!><hr id=final>' ),
18491850
);
18501851
}
18511852

0 commit comments

Comments
 (0)