Skip to content

Commit

Permalink
Ensure all sanitizers run when building featured image
Browse files Browse the repository at this point in the history
This ensures that the amp-anim script, for example, will be assured to be included. It also ensures that if a plugin adds other markup to a featured image via the post_thumbnail_html filter that it will be properly sanitized.
  • Loading branch information
westonruter committed Apr 20, 2018
1 parent d65578d commit 5045563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/templates/class-amp-post-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ private function build_post_featured_image() {

list( $sanitized_html, $featured_scripts, $featured_styles ) = AMP_Content_Sanitizer::sanitize(
$featured_html,
array( 'AMP_Img_Sanitizer' => array() ),
amp_get_content_sanitizers( $this->post ),
array(
'content_max_width' => $this->get( 'content_max_width' ),
)
Expand Down

0 comments on commit 5045563

Please sign in to comment.