diff --git a/assets/css/amp-default.css b/assets/css/amp-default.css index 2c837e2f469..75df5e14ae3 100644 --- a/assets/css/amp-default.css +++ b/assets/css/amp-default.css @@ -1,4 +1,4 @@ -.amp-wp-unknown-size img { +.amp-wp-unknown-size [src] { /** Worst case scenario when we can't figure out dimensions for an image. **/ /** Force the image into a box of fixed dimensions and use object-fit to scale. **/ object-fit: contain; diff --git a/assets/js/amp-editor-blocks.js b/assets/js/amp-editor-blocks.js index 7b9128f5d3f..2f40feb1a96 100644 --- a/assets/js/amp-editor-blocks.js +++ b/assets/js/amp-editor-blocks.js @@ -731,7 +731,7 @@ var ampEditorBlocks = ( function() { // eslint-disable-line no-unused-vars return element; } } else if ( ! component.hasGalleryShortcodeCarouselAttribute( attributes.text || '' ) ) { - // Add amp-carousel=false attribut to the shortcode. + // Add amp-carousel=false attribute to the shortcode. text = attributes.text.replace( '[gallery', '[gallery amp-carousel=false' ); } else { text = attributes.text; diff --git a/includes/sanitizers/class-amp-audio-sanitizer.php b/includes/sanitizers/class-amp-audio-sanitizer.php index 4c593a2e124..3622ccb2208 100644 --- a/includes/sanitizers/class-amp-audio-sanitizer.php +++ b/includes/sanitizers/class-amp-audio-sanitizer.php @@ -20,6 +20,17 @@ class AMP_Audio_Sanitizer extends AMP_Base_Sanitizer { */ public static $tag = 'audio'; + /** + * Get mapping of HTML selectors to the AMP component selectors which they may be converted into. + * + * @return array Mapping. + */ + public function get_selector_conversion_mapping() { + return array( + 'audio' => array( 'amp-audio' ), + ); + } + /** * Sanitize the