Skip to content

Commit 861296d

Browse files
pierlonwestonruter
authored andcommitted
Patch the PHP-CSS-Parser library to correctly validate the turn unit (#5392)
1 parent ee08122 commit 861296d

File tree

5 files changed

+451
-25
lines changed

5 files changed

+451
-25
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
},
5353
"patches": {
5454
"sabberworm/php-css-parser": {
55+
"Add additional validation for size unit <https://github.com/sabberworm/PHP-CSS-Parser/pull/193>": "patches/php-css-parser-pull-193.patch",
5556
"Validate name-start code points for identifier <https://github.com/sabberworm/PHP-CSS-Parser/pull/185>": "patches/php-css-parser-pull-185.patch",
5657
"Fix parsing CSS selectors which contain commas <https://github.com/westonruter/PHP-CSS-Parser/pull/1>": "patches/php-css-parser-commit-10a2501.patch"
5758
}

composer.lock

Lines changed: 27 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/sanitizers/class-amp-style-sanitizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,7 @@ private function get_parsed_stylesheet( $stylesheet, $options = [] ) {
15611561
$parsed = null;
15621562
$cache_key = null;
15631563
$cached = true;
1564-
$cache_group = 'amp-parsed-stylesheet-v32'; // This should be bumped whenever the PHP-CSS-Parser is updated or parsed format is updated.
1564+
$cache_group = 'amp-parsed-stylesheet-v33'; // This should be bumped whenever the PHP-CSS-Parser is updated or parsed format is updated.
15651565
$use_transients = $this->should_use_transient_caching();
15661566

15671567
$cache_impacting_options = array_merge(

0 commit comments

Comments
 (0)