File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -453,11 +453,18 @@ private function spawn_fragment_parser( string $html ): ?self {
453453 $ fragment_processor = self ::create_fragment ( $ html );
454454 $ fragment_processor ->compat_mode = $ this ->compat_mode ;
455455
456- // @todo The context element probably needs a namespace{
457456 $ context_element = array ( $ this ->get_tag (), array () );
458457 foreach ( $ this ->get_attribute_names_with_prefix ( '' ) as $ name => $ value ) {
459458 $ context_element [1 ][ $ name ] = $ value ;
460459 }
460+
461+ $ fragment_processor ->context_node = new WP_HTML_Token (
462+ 'context-node ' ,
463+ $ context_element [0 ],
464+ $ this ->has_self_closing_flag ()
465+ );
466+ $ fragment_processor ->context_node ->namespace = $ this ->get_namespace ();
467+
461468 $ fragment_processor ->state ->context_node = $ context_element ;
462469
463470 if ( 'TEMPLATE ' === $ context_element [0 ] ) {
You can’t perform that action at this time.
0 commit comments