Skip to content

Commit

Permalink
(html5lib-tests) Handle cdata nodes and more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Feb 2, 2024
1 parent 5462378 commit 58b6fc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ public static function build_html5_treelike_string( $fragment_context, $html ) {

break;

case '#cdata-section':
case '#text':
$output .= str_repeat( $indent, $indent_level ) . "\"{$processor->get_modifiable_text()}\"\n";
break;
Expand All @@ -191,6 +192,7 @@ public static function build_html5_treelike_string( $fragment_context, $html ) {
switch ( $processor->get_comment_type() ) {
case WP_HTML_Processor::COMMENT_AS_ABRUPTLY_CLOSED_COMMENT:
case WP_HTML_Processor::COMMENT_AS_HTML_COMMENT:
case WP_HTML_Processor::COMMENT_AS_INVALID_HTML:
$comment_text_content = $processor->get_modifiable_text();
break;

Expand Down

0 comments on commit 58b6fc0

Please sign in to comment.