Skip to content

Commit e4d7d06

Browse files
committed
Remove quick workaround for removing comments.
1 parent 340418b commit e4d7d06

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,7 +1916,6 @@ public function is_tag_closer() {
19161916
public function get_previous_text_chunk() {
19171917
if ( $this->bytes_already_parsed >= strlen( $this->html ) ) {
19181918
$chunk = substr( $this->html, $this->last_position->end === 0 ? 0 : $this->last_position->end + 1 );
1919-
$chunk = preg_replace( '/<[^a-z].*>/i', '', $chunk );
19201919
return html_entity_decode( $chunk, ENT_HTML5 | ENT_QUOTES | ENT_SUBSTITUTE );
19211920
}
19221921

@@ -1927,7 +1926,6 @@ public function get_previous_text_chunk() {
19271926
$chunk_start = $this->last_position->end === 0 ? 0 : $this->last_position->end + 1;
19281927
$chunk_end = $this->is_tag_closer() ? $this->tag_name_starts_at - 2 : $this->tag_name_starts_at - 1;
19291928
$chunk = substr( $this->html, $chunk_start, $chunk_end - $chunk_start );
1930-
$chunk = preg_replace( '/<[^a-z].*>/i', '', $chunk );
19311929
return html_entity_decode( $chunk, ENT_HTML5 | ENT_QUOTES | ENT_SUBSTITUTE );
19321930
}
19331931

0 commit comments

Comments
 (0)