Skip to content

Commit

Permalink
Remove full tag HTML generation and test again with only the tag name.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Aug 29, 2023
1 parent 35ac288 commit 484deb0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions projects/packages/image-cdn/src/class-image-cdn.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,7 @@ public static function filter_the_content( $content ) {
}

// @TODO: Do the filters need the full HTML or is it enough to pass the tag name, e.g. 'AMP-IMG'?
// Generates a canonical HTML representation of the original tag.
$tag_maker = new \WP_HTML_Tag_Processor( "<{$p->get_tag()}>" );
foreach ( $p->get_attribute_names_with_prefix( '' ) as $name ) {
$tag_maker->set_attribute( $name, $p->get_attribute( $name ) );
}
$tag = $tag_maker->get_updated_html();
$tag = $p->get_tag();

// Default to resize, though fit may be used in certain cases where a dimension cannot be ascertained.
$transform = 'resize';
Expand Down

0 comments on commit 484deb0

Please sign in to comment.