Skip to content

Commit

Permalink
Merge pull request #1665 from Automattic/update_generated_tags_file
Browse files Browse the repository at this point in the history
Update generated tags file to 767
  • Loading branch information
westonruter committed Nov 29, 2018
2 parents 367d152 + 29f29d7 commit 0e53679
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 73 deletions.
202 changes: 135 additions & 67 deletions includes/sanitizers/class-amp-allowed-tags-generated.php
Expand Up @@ -13,7 +13,7 @@
*/
class AMP_Allowed_Tags_Generated {

private static $spec_file_revision = 757;
private static $spec_file_revision = 767;
private static $minimum_validator_revision_required = 348;

private static $allowed_tags = array(
Expand Down Expand Up @@ -1680,6 +1680,36 @@ class AMP_Allowed_Tags_Generated {
),
),
),
'amp-delight-player' => array(
array(
'attr_spec_list' => array(
'data-content-id' => array(
'mandatory' => true,
),
'media' => array(),
'noloading' => array(
'value' => array(
'',
),
),
),
'tag_spec' => array(
'amp_layout' => array(
'supported_layouts' => array(
6,
2,
3,
7,
1,
4,
),
),
'requires_extension' => array(
'amp-delight-player',
),
),
),
),
'amp-embed' => array(
array(
'attr_spec_list' => array(
Expand Down Expand Up @@ -2936,6 +2966,36 @@ class AMP_Allowed_Tags_Generated {
'unique' => true,
),
),
array(
'attr_spec_list' => array(
'data-client' => array(
'mandatory' => true,
),
'data-slot' => array(
'mandatory' => true,
),
'type' => array(
'mandatory' => true,
'value' => array(
'adsense',
),
),
),
'tag_spec' => array(
'reference_points' => array(
'AMP-NEXT-PAGE > [separator]' => array(
'mandatory' => false,
'unique' => true,
),
),
'requires_extension' => array(
'amp-next-page',
),
'spec_name' => 'amp-next-page [type=adsense]',
'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-next-page',
'unique' => true,
),
),
),
'amp-nexxtv-player' => array(
array(
Expand Down Expand Up @@ -3438,47 +3498,6 @@ class AMP_Allowed_Tags_Generated {
),
),
),
'amp-script' => array(
array(
'attr_spec_list' => array(
'media' => array(),
'noloading' => array(
'value' => array(
'',
),
),
'src' => array(
'blacklisted_value_regex' => '__amp_source_origin',
'mandatory' => true,
'value_url' => array(
'allow_relative' => false,
'protocol' => array(
'https',
),
),
),
),
'tag_spec' => array(
'amp_layout' => array(
'supported_layouts' => array(
5,
6,
2,
3,
7,
1,
4,
),
),
'disallowed_ancestor' => array(
'amp-script',
),
'requires_extension' => array(
'amp-script',
),
),
),
),
'amp-selector' => array(
array(
'attr_spec_list' => array(
Expand Down Expand Up @@ -6807,6 +6826,7 @@ class AMP_Allowed_Tags_Generated {
array(
'attr_spec_list' => array(
'alt' => array(),
'attribution' => array(),
'border' => array(),
'decoding' => array(
'value' => array(
Expand All @@ -6826,6 +6846,7 @@ class AMP_Allowed_Tags_Generated {
),
),
),
'sizes' => array(),
'src' => array(
'alternative_names' => array(
'srcset',
Expand Down Expand Up @@ -10025,6 +10046,31 @@ class AMP_Allowed_Tags_Generated {
),
),
),
array(
'attr_spec_list' => array(
'async' => array(
'mandatory' => true,
'value' => array(
'',
),
),
'nonce' => array(),
'type' => array(
'value_casei' => array(
'text/javascript',
),
),
),
'tag_spec' => array(
'extension_spec' => array(
'name' => 'amp-delight-player',
'version' => array(
'0.1',
'latest',
),
),
),
),
array(
'attr_spec_list' => array(
'async' => array(
Expand Down Expand Up @@ -11346,31 +11392,6 @@ class AMP_Allowed_Tags_Generated {
),
),
),
array(
'attr_spec_list' => array(
'async' => array(
'mandatory' => true,
'value' => array(
'',
),
),
'nonce' => array(),
'type' => array(
'value_casei' => array(
'text/javascript',
),
),
),
'tag_spec' => array(
'extension_spec' => array(
'name' => 'amp-script',
'version' => array(
'0.1',
'latest',
),
),
),
),
array(
'attr_spec_list' => array(
'async' => array(
Expand Down Expand Up @@ -11637,6 +11658,25 @@ class AMP_Allowed_Tags_Generated {
),
),
),
array(
'attr_spec_list' => array(
'type' => array(
'dispatch_key' => 3,
'mandatory' => true,
'value_casei' => array(
'application/json',
),
),
),
'tag_spec' => array(
'mandatory_parent' => 'amp-story-bookend',
'requires_extension' => array(
'amp-story',
),
'spec_name' => 'amp-story-bookend extension .json script',
'unique' => true,
),
),
array(
'attr_spec_list' => array(
'nonce' => array(),
Expand Down Expand Up @@ -14384,6 +14424,20 @@ class AMP_Allowed_Tags_Generated {
'animate-in-after' => array(),
'animate-in-delay' => array(),
'animate-in-duration' => array(),
'data-tooltip-icon' => array(
'value_url' => array(
'protocol' => array(
'http',
'https',
'data',
),
),
),
'target' => array(
'value' => array(
'_blank',
),
),
),
'tag_spec' => array(
'reference_points' => array(
Expand Down Expand Up @@ -14450,6 +14504,15 @@ class AMP_Allowed_Tags_Generated {
'animate-in-after' => array(),
'animate-in-delay' => array(),
'animate-in-duration' => array(),
'data-tooltip-icon' => array(
'value_url' => array(
'protocol' => array(
'http',
'https',
'data',
),
),
),
'grid-area' => array(),
'justify-content' => array(
'value' => array(
Expand Down Expand Up @@ -14478,6 +14541,11 @@ class AMP_Allowed_Tags_Generated {
'stretch',
),
),
'target' => array(
'value' => array(
'_blank',
),
),
),
'tag_spec' => array(
'reference_points' => array(
Expand Down
12 changes: 6 additions & 6 deletions tests/test-tag-and-attribute-sanitizer.php
Expand Up @@ -290,12 +290,6 @@ public function get_body_data() {
array( 'amp-position-observer' ),
),

'amp-script' => array(
'<amp-script layout="container" src="https://example.com/foo.js"><div class="foo"><p>Example text</p></div></amp-script>',
null, // No change.
array( 'amp-script' ),
),

'amp-twitter' => array(
'<amp-twitter width="321" height="543" layout="responsive" data-tweetid="98765"></amp-twitter>',
null, // No change.
Expand Down Expand Up @@ -889,6 +883,12 @@ public function get_body_data() {
array( 'amp-date-picker', 'amp-bind', 'amp-mustache' ),
),

'amp-delight-player' => array(
'<amp-delight-player data-content-id="-987521" layout="responsive" width="400" height="300"></amp-delight-player>',
null, // No change.
array( 'amp-delight-player' ),
),

'amp-img-layout-allowed' => array(
implode( '', array(
'<amp-img src="/img1.png" width="50" height="50" layout="fill"></amp-img>',
Expand Down

0 comments on commit 0e53679

Please sign in to comment.