Skip to content

Commit

Permalink
Derive WP_Block_Markup_Processor from WP_HTML_Tag_Processor, not WP_H…
Browse files Browse the repository at this point in the history
…TML_Processor, to avoid bailing on unsupported structures
  • Loading branch information
adamziel committed Jan 2, 2025
1 parent 34e08ff commit 86ab57d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* If the post cannot fit into memory, WordPress won't be able to render it
* anyway.
*/
class WP_Block_Markup_Processor extends WP_HTML_Processor {
class WP_Block_Markup_Processor extends WP_HTML_Tag_Processor {

private $block_name;
protected $block_attributes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class WP_Block_Markup_Url_Processor extends WP_Block_Markup_Processor {
* @return WP_Block_Markup_Url_Processor
*/
public static function create_from_html( $html, $base_url_string = null ) {
$processor = static::create_fragment( $html );
$processor = new static( $html );
$processor->base_url_string = $base_url_string;
$processor->base_url_object = $base_url_string ? WP_URL::parse( $base_url_string ) : null;
return $processor;
Expand Down

0 comments on commit 86ab57d

Please sign in to comment.