diff --git a/includes/sanitizers/class-amp-meta-sanitizer.php b/includes/sanitizers/class-amp-meta-sanitizer.php index 0a30073b14f..0ce80da2b9e 100644 --- a/includes/sanitizers/class-amp-meta-sanitizer.php +++ b/includes/sanitizers/class-amp-meta-sanitizer.php @@ -115,15 +115,6 @@ public function sanitize() { $meta_elements = iterator_to_array( $this->dom->getElementsByTagName( static::$tag ), false ); foreach ( $meta_elements as $meta_element ) { - - // Strip whitespace around equal signs. Won't be needed after is resolved. - if ( $meta_element->hasAttribute( Attribute::CONTENT ) ) { - $meta_element->setAttribute( - Attribute::CONTENT, - preg_replace( '/\s*=\s*/', '=', $meta_element->getAttribute( Attribute::CONTENT ) ) - ); - } - /** * Meta tag to process. * diff --git a/package-lock.json b/package-lock.json index 729a850d271..31d4c58db29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16819,9 +16819,9 @@ } }, "postcss": { - "version": "8.4.8", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.8.tgz", - "integrity": "sha512-2tXEqGxrjvAO6U+CJzDL2Fk2kPHTv1jQsYkSoMeOis2SsYaXRO2COxTdQp99cYvif9JTXaAk9lYGc3VhJt7JPQ==", + "version": "8.4.11", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.11.tgz", + "integrity": "sha512-D+jFLnT0ilGfy4CVBGbC+XE68HkVpT8+CUkDrcSpgxmo4RKco2uaZ4kIoyVGEm+m8KN/+Vwgs8MtpNbQ3/ma9w==", "dev": true, "requires": { "nanoid": "^3.3.1", diff --git a/package.json b/package.json index a58fb96f1d8..c51ba316a39 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "lodash": "4.17.21", "moment": "2.29.1", "npm-run-all": "4.1.5", - "postcss": "8.4.8", + "postcss": "8.4.11", "postcss-import": "14.0.2", "postcss-loader": "4.3.0", "postcss-nested": "5.0.1", diff --git a/tests/php/test-amp-style-sanitizer.php b/tests/php/test-amp-style-sanitizer.php index 787db1fd22e..d8f2bc2765e 100644 --- a/tests/php/test-amp-style-sanitizer.php +++ b/tests/php/test-amp-style-sanitizer.php @@ -3496,6 +3496,7 @@ function( $original_dom, $original_source, $amphtml_dom, $amphtml_source ) { $this->assertStringContainsString( '.wp-block-audio figcaption', $amphtml_source, 'Expected block-library/style.css' ); $this->assertStringContainsString( '[class^="wp-block-"]:not(.wp-block-gallery) figcaption', $amphtml_source, 'Expected twentyten/blocks.css' ); + $amphtml_source = preg_replace( '/\s*>\s*/', '>', $amphtml_source ); // Account for variance in postcss. $this->assertStringContainsString( '.amp-wp-default-form-message>p', $amphtml_source, 'Expected amp-default.css' ); $this->assertStringContainsString( 'ab-empty-item', $amphtml_source, 'Expected admin-bar.css to still be present.' ); $this->assertStringNotContainsString( 'earlyprintstyle', $amphtml_source, 'Expected early print style to not be present.' ); diff --git a/tests/php/validation/test-class-amp-validation-manager.php b/tests/php/validation/test-class-amp-validation-manager.php index fba574aa5ae..ee2db4fe4fd 100644 --- a/tests/php/validation/test-class-amp-validation-manager.php +++ b/tests/php/validation/test-class-amp-validation-manager.php @@ -1237,13 +1237,12 @@ static function () { '//script[ @id = "jquery-core-js-before" ]', '//script[ @id = "jquery-core-js-after" ]', '//script[ @id = "wp-dom-ready-js" ]', - '//script[ @id = "wp-dom-ready-js-translations" ]', '//script[ @id = "quicktags-js" ]', '//script[ @id = "quicktags-js-extra" ]', '//script[ contains( text(), "window.wpActiveEditor" ) ]', ], function ( ...$sources_sets ) { - $this->assertCount( 7, $sources_sets ); + $this->assertCount( 6, $sources_sets ); foreach ( $sources_sets as $sources ) { $amp_source_count = 0; foreach ( $sources as $source ) {