Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update amphtml spec to ed0504b #6436

Merged
merged 5 commits into from
Aug 4, 2021
Merged

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Jun 30, 2021

Previously #6425.

  • Run ./bin/amphtml-update.sh (lando ssh -c 'bash ./bin/amphtml-update.sh vendor/amphtml').
  • Examine diff for changelog.
  • Examine upstream diff to ensure nothing was missed.
  • Update spec generator as needed based on spec format changes.
  • Modify validating sanitizer based on changes to spec, if needed.
  • Add tests for key changes.

Changelog

Details

(
    PREV_VERSION=2106240350000;
    THIS_VERSION=ed0504b;
    git checkout $THIS_VERSION;
    git diff $PREV_VERSION...$THIS_VERSION -w -- $( git ls-files | grep '.protoascii' );
    git checkout - > /dev/null
)
diff --git a/extensions/amp-embedly-card/validator-amp-embedly-card.protoascii b/extensions/amp-embedly-card/validator-amp-embedly-card.protoascii
index 2d7abb6f4b..ebf1d84831 100644
--- a/extensions/amp-embedly-card/validator-amp-embedly-card.protoascii
+++ b/extensions/amp-embedly-card/validator-amp-embedly-card.protoascii
@@ -20,11 +20,11 @@ tags: {  # embedly-card
   extension_spec: {
     name: "amp-embedly-card"
     version: "0.1"
+    version: "1.0"
     version: "latest"
   }
   attr_lists: "common-extension-attrs"
 }
-
 tags: {  # <amp-embedly-card>
   html_format: AMP
   tag_name: "AMP-EMBEDLY-CARD"
diff --git a/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii b/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii
index e086d2ae5e..eee4f29d7b 100644
--- a/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii
+++ b/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii
@@ -20,7 +20,6 @@ tags: {  # amp-facebook-like
   extension_spec: {
     name: "amp-facebook-like"
     version: "0.1"
-    version: "1.0"
     version: "latest"
   }
   attr_lists: "common-extension-attrs"
diff --git a/extensions/amp-lightbox-gallery/validator-amp-lightbox-gallery.protoascii b/extensions/amp-lightbox-gallery/validator-amp-lightbox-gallery.protoascii
index 9d9f2d2b42..35481f5a80 100644
--- a/extensions/amp-lightbox-gallery/validator-amp-lightbox-gallery.protoascii
+++ b/extensions/amp-lightbox-gallery/validator-amp-lightbox-gallery.protoascii
@@ -20,6 +20,7 @@ tags: {  # amp-lightbox-gallery
   extension_spec: {
     name: "amp-lightbox-gallery"
     version: "0.1"
+    version: "1.0"
     version: "latest"
     requires_usage: NONE
   }
diff --git a/extensions/amp-soundcloud/validator-amp-soundcloud.protoascii b/extensions/amp-soundcloud/validator-amp-soundcloud.protoascii
index d72b5a18cf..5ba61a011b 100644
--- a/extensions/amp-soundcloud/validator-amp-soundcloud.protoascii
+++ b/extensions/amp-soundcloud/validator-amp-soundcloud.protoascii
@@ -14,11 +14,26 @@
 # limitations under the license.
 #
 
-tags: {  # amp-soundcloud
+tags: {  # amp-soundcloud 1.0
   html_format: AMP
   tag_name: "SCRIPT"
+  satisfies: "amp-soundcloud 1.0"
+  excludes: "amp-soundcloud 0.1"
   extension_spec: {
     name: "amp-soundcloud"
+    version_name: "v1.0"
+    version: "1.0"
+  }
+  attr_lists: "common-extension-attrs"
+}
+tags: {  # amp-soundcloud 0.1 and latest
+  html_format: AMP
+  tag_name: "SCRIPT"
+  satisfies: "amp-soundcloud 0.1"
+  excludes: "amp-soundcloud 1.0"
+  extension_spec: {
+    name: "amp-soundcloud"
+    version_name: "v0.1"
     version: "0.1"
     version: "latest"
     requires_usage: EXEMPTED
diff --git a/extensions/amp-story-interactive/validator-amp-story-interactive.protoascii b/extensions/amp-story-interactive/validator-amp-story-interactive.protoascii
index 7636182af3..7c774c00dd 100644
--- a/extensions/amp-story-interactive/validator-amp-story-interactive.protoascii
+++ b/extensions/amp-story-interactive/validator-amp-story-interactive.protoascii
@@ -180,6 +180,72 @@ tags: {  # <amp-story-interactive-results>
     value: "transparent"
   }
 }
+tags: {  # <amp-story-interactive-img-quiz>
+  html_format: AMP
+  tag_name: "AMP-STORY-INTERACTIVE-IMG-QUIZ"
+  requires_extension: "amp-story-interactive"
+  mandatory_ancestor: "AMP-STORY-GRID-LAYER"
+  attr_lists: "interactive-options-img-attrs"
+  attr_lists: "interactive-options-confetti-attrs"
+  attr_lists: "interactive-shared-configs-attrs"
+  attrs: {
+    name: "option-1-correct"
+    mandatory_oneof: "['option-1-correct', 'option-2-correct', 'option-3-correct', 'option-4-correct']"
+  }
+  attrs: {
+    name: "option-2-correct"
+    mandatory_oneof: "['option-1-correct', 'option-2-correct', 'option-3-correct', 'option-4-correct']"
+  }
+  attrs: {
+    name: "option-3-correct"
+    mandatory_oneof: "['option-1-correct', 'option-2-correct', 'option-3-correct', 'option-4-correct']"
+    trigger: {
+      also_requires_attr: "option-3-image"
+    }
+  }
+  attrs: {
+    name: "option-4-correct"
+    mandatory_oneof: "['option-1-correct', 'option-2-correct', 'option-3-correct', 'option-4-correct']"
+    trigger: {
+      also_requires_attr: "option-4-image"
+    }
+  }
+}
+tags: {  # <amp-story-interactive-img-poll>
+  html_format: AMP
+  tag_name: "AMP-STORY-INTERACTIVE-IMG-POLL"
+  requires_extension: "amp-story-interactive"
+  mandatory_ancestor: "AMP-STORY-GRID-LAYER"
+  attr_lists: "interactive-options-img-attrs"
+  attr_lists: "interactive-options-confetti-attrs"
+  attr_lists: "interactive-shared-configs-attrs"
+  attrs: {
+    name: "option-1-results-category"
+    trigger: {
+      also_requires_attr: "option-2-results-category"
+    }
+  }
+  attrs: {
+    name: "option-2-results-category"
+    trigger: {
+      also_requires_attr: "option-1-results-category"
+    }
+  }
+  attrs: {
+    name: "option-3-results-category"
+    trigger: {
+      also_requires_attr: "option-2-results-category"
+      also_requires_attr: "option-3-image"
+    }
+  }
+  attrs: {
+    name: "option-4-results-category"
+    trigger: {
+      also_requires_attr: "option-3-results-category"
+      also_requires_attr: "option-4-image"
+    }
+  }
+}
 
 attr_lists: {
   name: "interactive-shared-configs-attrs"
@@ -281,3 +347,63 @@ attr_lists: {
     }
   }
 }
+attr_lists: {
+  name: "interactive-options-img-attrs"
+  attrs: {
+    name: "option-1-image"
+    mandatory: true
+    value_url: {
+      protocol: "http"
+      protocol: "https"
+    }
+  }
+  attrs: {
+    name: "option-2-image"
+    mandatory: true
+    value_url: {
+      protocol: "http"
+      protocol: "https"
+    }
+  }
+  attrs: {
+    name: "option-3-image"
+    trigger: {
+      also_requires_attr: "option-3-image-alt"
+    }
+    value_url: {
+      protocol: "http"
+      protocol: "https"
+    }
+  }
+  attrs: {
+    name: "option-4-image"
+    trigger: {
+      also_requires_attr: "option-3-image"
+      also_requires_attr: "option-4-image-alt"
+    }
+    value_url: {
+      protocol: "http"
+      protocol: "https"
+    }
+  }
+  attrs: {
+    name: "option-1-image-alt"
+    mandatory: true
+  }
+  attrs: {
+    name: "option-2-image-alt"
+    mandatory: true
+  }
+  attrs: {
+    name: "option-3-image-alt"
+    trigger: {
+      also_requires_attr: "option-3-image"
+    }
+  }
+  attrs: {
+    name: "option-4-image-alt"
+    trigger: {
+      also_requires_attr: "option-4-image"
+    }
+  }
+}
diff --git a/extensions/amp-story/validator-amp-story.protoascii b/extensions/amp-story/validator-amp-story.protoascii
index 9a3b676cc2..c71289deb3 100644
--- a/extensions/amp-story/validator-amp-story.protoascii
+++ b/extensions/amp-story/validator-amp-story.protoascii
@@ -617,6 +617,7 @@ descendant_tag_list: {
   tag: "EM"
   tag: "FECOLORMATRIX"
   tag: "FECOMPOSITE"
+  tag: "FEBLEND"
   tag: "FEFLOOD"
   tag: "FEGAUSSIANBLUR"
   tag: "FEMERGE"
@@ -719,6 +720,8 @@ descendant_tag_list: {
   tag: "AMP-STORY-360"
   tag: "AMP-STORY-AUTO-ANALYTICS"
   tag: "AMP-STORY-INTERACTIVE-BINARY-POLL"
+  tag: "AMP-STORY-INTERACTIVE-IMG-POLL"
+  tag: "AMP-STORY-INTERACTIVE-IMG-QUIZ"
   tag: "AMP-STORY-INTERACTIVE-POLL"
   tag: "AMP-STORY-INTERACTIVE-QUIZ"
   tag: "AMP-STORY-INTERACTIVE-RESULTS"
@@ -753,6 +756,7 @@ descendant_tag_list: {
   tag: "EM"
   tag: "FECOLORMATRIX"
   tag: "FECOMPOSITE"
+  tag: "FEBLEND"
   tag: "FEFLOOD"
   tag: "FEGAUSSIANBLUR"
   tag: "FEMERGE"
@@ -1128,6 +1132,7 @@ descendant_tag_list {
   tag: "EM"
   tag: "FECOLORMATRIX"
   tag: "FECOMPOSITE"
+  tag: "FEBLEND"
   tag: "FEFLOOD"
   tag: "FEGAUSSIANBLUR"
   tag: "FEMERGE"
diff --git a/extensions/amp-tiktok/validator-amp-tiktok.protoascii b/extensions/amp-tiktok/validator-amp-tiktok.protoascii
new file mode 100644
index 0000000000..72bcee32ee
--- /dev/null
+++ b/extensions/amp-tiktok/validator-amp-tiktok.protoascii
@@ -0,0 +1,77 @@
+#
+# Copyright 2021 The AMP HTML Authors. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS-IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the license.
+#
+
+tags: {  # amp-tiktok
+  html_format: AMP
+  tag_name: "SCRIPT"
+  extension_spec: {
+    name: "amp-tiktok"
+    version: "0.1"
+    version: "latest"
+  }
+  attr_lists: "common-extension-attrs"
+}
+tags: {  # <amp-tiktok>
+  html_format: AMP
+  tag_name: "AMP-TIKTOK"
+  spec_name: "AMP-TIKTOK"
+  requires_extension: "amp-tiktok"
+  attr_lists: "extended-amp-global"
+  attrs: {
+    name: "data-src";
+    value_regex: "(https://www\\.tiktok\\.com/.*)?\\d+.*";
+    mandatory: true
+  }
+  spec_url: "https://amp.dev/documentation/components/amp-tiktok"
+  amp_layout: {
+    supported_layouts: FILL
+    supported_layouts: FIXED
+    supported_layouts: FIXED_HEIGHT
+    supported_layouts: FLEX_ITEM
+    supported_layouts: INTRINSIC
+    supported_layouts: NODISPLAY
+    supported_layouts: RESPONSIVE
+  }
+}
+tags: {  # <amp-tiktok>
+  html_format: AMP
+  tag_name: "AMP-TIKTOK"
+  spec_name: "AMP-TIKTOK blockquote"
+  requires_extension: "amp-tiktok"
+  attr_lists: "extended-amp-global"
+  spec_url: "https://amp.dev/documentation/components/amp-tiktok"
+  amp_layout: {
+    supported_layouts: FILL
+    supported_layouts: FIXED
+    supported_layouts: FIXED_HEIGHT
+    supported_layouts: FLEX_ITEM
+    supported_layouts: INTRINSIC
+    supported_layouts: NODISPLAY
+    supported_layouts: RESPONSIVE
+  }
+  child_tags: {
+    child_tag_name_oneof: "BLOCKQUOTE"
+    mandatory_min_num_child_tags: 1
+  }
+}
+tags: {
+  html_format: AMP
+  tag_name: "BLOCKQUOTE"
+  spec_name: "BLOCKQUOTE with TikTok"
+  attrs: { name: "align" }
+  attr_lists: "cite-attr"
+  mandatory_ancestor: "AMP-TIKTOK blockquote"
+}
diff --git a/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii b/extensions/amp-wordpress-embed/validator-amp-wordpress-embed.protoascii
similarity index 74%
copy from extensions/amp-facebook-like/validator-amp-facebook-like.protoascii
copy to extensions/amp-wordpress-embed/validator-amp-wordpress-embed.protoascii
index e086d2ae5e..33622d203c 100644
--- a/extensions/amp-facebook-like/validator-amp-facebook-like.protoascii
+++ b/extensions/amp-wordpress-embed/validator-amp-wordpress-embed.protoascii
@@ -1,5 +1,5 @@
 #
-# Copyright 2017 The AMP HTML Authors. All Rights Reserved.
+# Copyright 2021 The AMP HTML Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,37 +14,36 @@
 # limitations under the license.
 #
 
-tags: {  # amp-facebook-like
+tags: {  # amp-wordpress-embed
   html_format: AMP
   tag_name: "SCRIPT"
   extension_spec: {
-    name: "amp-facebook-like"
-    version: "0.1"
+    name: "amp-wordpress-embed"
     version: "1.0"
     version: "latest"
   }
   attr_lists: "common-extension-attrs"
 }
-tags: {  # <amp-facebook-like>
+tags: {  # <amp-wordpress-embed>
   html_format: AMP
-  tag_name: "AMP-FACEBOOK-LIKE"
-  requires_extension: "amp-facebook-like"
-  # data-* is generally allowed, but it's not generally mandatory.
+  tag_name: "AMP-WORDPRESS-EMBED"
+  requires_extension: "amp-wordpress-embed"
+  attr_lists: "extended-amp-global"
+  spec_url: "https://amp.dev/documentation/components/amp-wordpress-embed/"
   attrs: {
-    name: "data-href"
-    mandatory: true
+    name: "data-url"
     value_url: {
-      protocol: "http"
       protocol: "https"
       allow_relative: false
     }
+    mandatory: true
   }
-  attr_lists: "extended-amp-global"
   amp_layout: {
     supported_layouts: FILL
     supported_layouts: FIXED
     supported_layouts: FIXED_HEIGHT
     supported_layouts: FLEX_ITEM
+    supported_layouts: INTRINSIC
     supported_layouts: NODISPLAY
     supported_layouts: RESPONSIVE
   }
diff --git a/validator/validator-main.protoascii b/validator/validator-main.protoascii
index 77637f8e91..485c435ce6 100644
--- a/validator/validator-main.protoascii
+++ b/validator/validator-main.protoascii
@@ -1322,6 +1322,19 @@ tags: {
 
 # 4.5 Text-level semantics
 # 4.5.1 The a element
+attr_lists: {
+  # https://github.com/ampproject/amphtml/issues/35067
+  name: "click-attributions"
+  attrs: { name: "attributiondestination" }
+  attrs: { name: "attributionexpiry" }
+  attrs: { name: "attributionreportto" }
+  attrs: { name: "attributionsourceeventid" }
+  attrs: { name: "attributionsourceid" }
+  attrs: { name: "conversiondestination" }
+  attrs: { name: "impressiondata" }
+  attrs: { name: "impressionexpiry" }
+  attrs: { name: "reportingorigin" }
+}
 tags: {
   html_format: AMP
   html_format: AMP4ADS
@@ -1427,6 +1440,7 @@ tags: {
     value: "auto"
     value: "true"
   }
+  attr_lists: "click-attributions"
   attr_lists: "name-attr"
   # <amp-bind>
   attrs: { name: "[href]" }
@@ -2719,6 +2733,11 @@ tags: {
   html_format: AMP
   tag_name: "INPUT"
   spec_name: "INPUT [type=file]"
+  attrs: {
+    disabled_by: "amp4email"
+    name: "capture"
+    value: ""
+  }
   attrs: {
     disabled_by: "amp4email"
     name: "no-verify"
@@ -5109,104 +5128,106 @@ error_specificity { code: WARNING_TAG_REQUIRED_BY_MISSING specificity: 14 }
 error_specificity { code: EXTENSION_UNUSED specificity: 15 }
 error_specificity { code: WARNING_EXTENSION_UNUSED specificity: 16 }
 error_specificity { code: WARNING_EXTENSION_DEPRECATED_VERSION specificity: 17 }
-error_specificity { code: NON_LTS_SCRIPT_AFTER_LTS specificity: 18 }
-error_specificity { code: LTS_SCRIPT_AFTER_NON_LTS specificity: 19 }
-error_specificity { code: INCORRECT_SCRIPT_RELEASE_VERSION specificity: 20 }
-error_specificity { code: DISALLOWED_AMP_DOMAIN specificity: 21 }
-error_specificity { code: DISALLOWED_TAG specificity: 22 }
-error_specificity { code: DISALLOWED_ATTR specificity: 23 }
-error_specificity { code: INVALID_ATTR_VALUE specificity: 24 }
-error_specificity { code: DUPLICATE_ATTRIBUTE specificity: 25 }
-error_specificity { code: ATTR_VALUE_REQUIRED_BY_LAYOUT specificity: 26 }
-error_specificity { code: MANDATORY_ATTR_MISSING specificity: 27 }
-error_specificity { code: MANDATORY_ONEOF_ATTR_MISSING specificity: 28 }
-error_specificity { code: MANDATORY_ANYOF_ATTR_MISSING specificity: 29 }
-error_specificity { code: ATTR_REQUIRED_BUT_MISSING specificity: 30 }
-error_specificity { code: DUPLICATE_UNIQUE_TAG specificity: 31 }
-error_specificity { code: DUPLICATE_UNIQUE_TAG_WARNING specificity: 32 }
-error_specificity { code: STYLESHEET_TOO_LONG specificity: 33 }
-error_specificity { code: STYLESHEET_AND_INLINE_STYLE_TOO_LONG specificity: 34 }
-error_specificity { code: INLINE_STYLE_TOO_LONG specificity: 35 }
-error_specificity { code: INLINE_SCRIPT_TOO_LONG specificity: 36 }
-error_specificity { code: CSS_SYNTAX_INVALID_AT_RULE specificity: 37 }
+error_specificity { code: INVALID_EXTENSION_VERSION specificity: 18 }
+error_specificity { code: INVALID_EXTENSION_PATH specificity: 19 }
+error_specificity { code: NON_LTS_SCRIPT_AFTER_LTS specificity: 20 }
+error_specificity { code: LTS_SCRIPT_AFTER_NON_LTS specificity: 21 }
+error_specificity { code: INCORRECT_SCRIPT_RELEASE_VERSION specificity: 22 }
+error_specificity { code: DISALLOWED_AMP_DOMAIN specificity: 23 }
+error_specificity { code: DISALLOWED_TAG specificity: 24 }
+error_specificity { code: DISALLOWED_ATTR specificity: 25 }
+error_specificity { code: INVALID_ATTR_VALUE specificity: 26 }
+error_specificity { code: DUPLICATE_ATTRIBUTE specificity: 27 }
+error_specificity { code: ATTR_VALUE_REQUIRED_BY_LAYOUT specificity: 28 }
+error_specificity { code: MANDATORY_ATTR_MISSING specificity: 29 }
+error_specificity { code: MANDATORY_ONEOF_ATTR_MISSING specificity: 30 }
+error_specificity { code: MANDATORY_ANYOF_ATTR_MISSING specificity: 31 }
+error_specificity { code: ATTR_REQUIRED_BUT_MISSING specificity: 32 }
+error_specificity { code: DUPLICATE_UNIQUE_TAG specificity: 33 }
+error_specificity { code: DUPLICATE_UNIQUE_TAG_WARNING specificity: 34 }
+error_specificity { code: STYLESHEET_TOO_LONG specificity: 35 }
+error_specificity { code: STYLESHEET_AND_INLINE_STYLE_TOO_LONG specificity: 36 }
+error_specificity { code: INLINE_STYLE_TOO_LONG specificity: 37 }
+error_specificity { code: INLINE_SCRIPT_TOO_LONG specificity: 38 }
+error_specificity { code: CSS_SYNTAX_INVALID_AT_RULE specificity: 39 }
 error_specificity {
-  code: MANDATORY_PROPERTY_MISSING_FROM_ATTR_VALUE specificity: 38
-}
-error_specificity { code: INVALID_PROPERTY_VALUE_IN_ATTR_VALUE specificity: 39 }
-error_specificity { code: DISALLOWED_PROPERTY_IN_ATTR_VALUE specificity: 40 }
-error_specificity { code: MUTUALLY_EXCLUSIVE_ATTRS specificity: 41 }
-error_specificity { code: UNESCAPED_TEMPLATE_IN_ATTR_VALUE specificity: 42 }
-error_specificity { code: TEMPLATE_PARTIAL_IN_ATTR_VALUE specificity: 43 }
-error_specificity { code: TEMPLATE_IN_ATTR_NAME specificity: 44 }
+  code: MANDATORY_PROPERTY_MISSING_FROM_ATTR_VALUE specificity: 40
+}
+error_specificity { code: INVALID_PROPERTY_VALUE_IN_ATTR_VALUE specificity: 41 }
+error_specificity { code: DISALLOWED_PROPERTY_IN_ATTR_VALUE specificity: 42 }
+error_specificity { code: MUTUALLY_EXCLUSIVE_ATTRS specificity: 43 }
+error_specificity { code: UNESCAPED_TEMPLATE_IN_ATTR_VALUE specificity: 44 }
+error_specificity { code: TEMPLATE_PARTIAL_IN_ATTR_VALUE specificity: 45 }
+error_specificity { code: TEMPLATE_IN_ATTR_NAME specificity: 46 }
 error_specificity {
-  code: INCONSISTENT_UNITS_FOR_WIDTH_AND_HEIGHT specificity: 45
-}
-error_specificity { code: MISSING_LAYOUT_ATTRIBUTES specificity: 46 }
-error_specificity { code: IMPLIED_LAYOUT_INVALID specificity: 47 }
-error_specificity { code: SPECIFIED_LAYOUT_INVALID specificity: 48 }
-error_specificity { code: ATTR_DISALLOWED_BY_IMPLIED_LAYOUT specificity: 49 }
-error_specificity { code: ATTR_DISALLOWED_BY_SPECIFIED_LAYOUT specificity: 50 }
-error_specificity { code: DUPLICATE_DIMENSION specificity: 51 }
-error_specificity { code: DISALLOWED_RELATIVE_URL specificity: 52 }
-error_specificity { code: MISSING_URL specificity: 53 }
-error_specificity { code: DISALLOWED_DOMAIN specificity: 54 }
-error_specificity { code: INVALID_URL_PROTOCOL specificity: 55 }
-error_specificity { code: INVALID_URL specificity: 56 }
-error_specificity { code: DISALLOWED_STYLE_ATTR specificity: 57 }
-error_specificity { code: CSS_SYNTAX_STRAY_TRAILING_BACKSLASH specificity: 58 }
-error_specificity { code: CSS_SYNTAX_UNTERMINATED_COMMENT specificity: 59 }
-error_specificity { code: CSS_SYNTAX_UNTERMINATED_STRING specificity: 60 }
-error_specificity { code: CSS_SYNTAX_BAD_URL specificity: 61 }
+  code: INCONSISTENT_UNITS_FOR_WIDTH_AND_HEIGHT specificity: 47
+}
+error_specificity { code: MISSING_LAYOUT_ATTRIBUTES specificity: 48 }
+error_specificity { code: IMPLIED_LAYOUT_INVALID specificity: 49 }
+error_specificity { code: SPECIFIED_LAYOUT_INVALID specificity: 50 }
+error_specificity { code: ATTR_DISALLOWED_BY_IMPLIED_LAYOUT specificity: 51 }
+error_specificity { code: ATTR_DISALLOWED_BY_SPECIFIED_LAYOUT specificity: 52 }
+error_specificity { code: DUPLICATE_DIMENSION specificity: 53 }
+error_specificity { code: DISALLOWED_RELATIVE_URL specificity: 54 }
+error_specificity { code: MISSING_URL specificity: 55 }
+error_specificity { code: DISALLOWED_DOMAIN specificity: 56 }
+error_specificity { code: INVALID_URL_PROTOCOL specificity: 57 }
+error_specificity { code: INVALID_URL specificity: 58 }
+error_specificity { code: DISALLOWED_STYLE_ATTR specificity: 59 }
+error_specificity { code: CSS_SYNTAX_STRAY_TRAILING_BACKSLASH specificity: 60 }
+error_specificity { code: CSS_SYNTAX_UNTERMINATED_COMMENT specificity: 61 }
+error_specificity { code: CSS_SYNTAX_UNTERMINATED_STRING specificity: 62 }
+error_specificity { code: CSS_SYNTAX_BAD_URL specificity: 63 }
 error_specificity {
-  code: CSS_SYNTAX_EOF_IN_PRELUDE_OF_QUALIFIED_RULE specificity: 62
+  code: CSS_SYNTAX_EOF_IN_PRELUDE_OF_QUALIFIED_RULE specificity: 64
 }
-error_specificity { code: CSS_SYNTAX_INVALID_DECLARATION specificity: 63 }
-error_specificity { code: CSS_SYNTAX_INCOMPLETE_DECLARATION specificity: 64 }
-error_specificity { code: CSS_SYNTAX_ERROR_IN_PSEUDO_SELECTOR specificity: 65 }
-error_specificity { code: CSS_SYNTAX_MISSING_SELECTOR specificity: 66 }
-error_specificity { code: CSS_SYNTAX_NOT_A_SELECTOR_START specificity: 67 }
+error_specificity { code: CSS_SYNTAX_INVALID_DECLARATION specificity: 65 }
+error_specificity { code: CSS_SYNTAX_INCOMPLETE_DECLARATION specificity: 66 }
+error_specificity { code: CSS_SYNTAX_ERROR_IN_PSEUDO_SELECTOR specificity: 67 }
+error_specificity { code: CSS_SYNTAX_MISSING_SELECTOR specificity: 68 }
+error_specificity { code: CSS_SYNTAX_NOT_A_SELECTOR_START specificity: 69 }
 error_specificity {
-  code: CSS_SYNTAX_UNPARSED_INPUT_REMAINS_IN_SELECTOR specificity: 68
-}
-error_specificity { code: CSS_SYNTAX_MISSING_URL specificity: 69 }
-error_specificity { code: CSS_SYNTAX_DISALLOWED_DOMAIN specificity: 70 }
-error_specificity { code: CSS_SYNTAX_INVALID_URL specificity: 71 }
-error_specificity { code: CSS_SYNTAX_INVALID_URL_PROTOCOL specificity: 72 }
-error_specificity { code: CSS_SYNTAX_DISALLOWED_RELATIVE_URL specificity: 73 }
-error_specificity { code: INCORRECT_NUM_CHILD_TAGS specificity: 74 }
-error_specificity { code: DISALLOWED_CHILD_TAG_NAME specificity: 75 }
-error_specificity { code: DISALLOWED_FIRST_CHILD_TAG_NAME specificity: 76 }
-error_specificity { code: CSS_SYNTAX_INVALID_ATTR_SELECTOR specificity: 77 }
+  code: CSS_SYNTAX_UNPARSED_INPUT_REMAINS_IN_SELECTOR specificity: 70
+}
+error_specificity { code: CSS_SYNTAX_MISSING_URL specificity: 71 }
+error_specificity { code: CSS_SYNTAX_DISALLOWED_DOMAIN specificity: 72 }
+error_specificity { code: CSS_SYNTAX_INVALID_URL specificity: 73 }
+error_specificity { code: CSS_SYNTAX_INVALID_URL_PROTOCOL specificity: 74 }
+error_specificity { code: CSS_SYNTAX_DISALLOWED_RELATIVE_URL specificity: 75 }
+error_specificity { code: INCORRECT_NUM_CHILD_TAGS specificity: 76 }
+error_specificity { code: DISALLOWED_CHILD_TAG_NAME specificity: 77 }
+error_specificity { code: DISALLOWED_FIRST_CHILD_TAG_NAME specificity: 78 }
+error_specificity { code: CSS_SYNTAX_INVALID_ATTR_SELECTOR specificity: 79 }
 error_specificity {
-  code: CHILD_TAG_DOES_NOT_SATISFY_REFERENCE_POINT specificity: 78
+  code: CHILD_TAG_DOES_NOT_SATISFY_REFERENCE_POINT specificity: 80
 }
-error_specificity { code: MANDATORY_REFERENCE_POINT_MISSING specificity: 79 }
-error_specificity { code: DUPLICATE_REFERENCE_POINT specificity: 80 }
-error_specificity { code: TAG_REFERENCE_POINT_CONFLICT specificity: 81 }
+error_specificity { code: MANDATORY_REFERENCE_POINT_MISSING specificity: 81 }
+error_specificity { code: DUPLICATE_REFERENCE_POINT specificity: 82 }
+error_specificity { code: TAG_REFERENCE_POINT_CONFLICT specificity: 83 }
 error_specificity {
   code: CHILD_TAG_DOES_NOT_SATISFY_REFERENCE_POINT_SINGULAR
-  specificity: 82
+  specificity: 84
 }
-error_specificity { code: CSS_SYNTAX_DISALLOWED_PROPERTY_VALUE specificity: 83 }
+error_specificity { code: CSS_SYNTAX_DISALLOWED_PROPERTY_VALUE specificity: 85 }
 error_specificity {
   code: CSS_SYNTAX_DISALLOWED_PROPERTY_VALUE_WITH_HINT
-  specificity: 84
+  specificity: 86
 }
 error_specificity {
   code: CSS_SYNTAX_PROPERTY_DISALLOWED_WITHIN_AT_RULE
-  specificity: 85
+  specificity: 87
 }
 error_specificity {
   code: CSS_SYNTAX_PROPERTY_DISALLOWED_TOGETHER_WITH
-  specificity: 86
+  specificity: 88
 }
 error_specificity {
   code: CSS_SYNTAX_PROPERTY_REQUIRES_QUALIFICATION
-  specificity: 87
+  specificity: 89
 }
 error_specificity {
   code: BASE_TAG_MUST_PRECEED_ALL_URLS
-  specificity: 88
+  specificity: 90
 }
 error_specificity { code: DISALLOWED_SCRIPT_TAG specificity: 102 }
 error_specificity { code: GENERAL_DISALLOWED_TAG specificity: 103 }
@@ -5335,6 +5356,17 @@ error_formats {
           "deprecated version. Please use a more recent version of this "
           "extension. This may become an error in the future."
 }
+error_formats {
+  code: INVALID_EXTENSION_VERSION
+  format: "The extension '%1' is referenced at version '%2' which is an "
+          "invalid version. Please use a valid version of this "
+          "extension."
+}
+error_formats {
+  code: INVALID_EXTENSION_PATH
+  format: "The extension '%1' has a path '%2' which is invalid. Please use "
+          "a valid path for this extension."
+}
 error_formats {
   code: INCORRECT_SCRIPT_RELEASE_VERSION
   format: "The script version for '%1' is a %2 version which mismatches "

@westonruter westonruter changed the title Update amphtml spec to 2106290147000 Update amphtml spec to 2107092322000 Jul 20, 2021
@westonruter westonruter marked this pull request as ready for review July 20, 2021 19:09
@westonruter westonruter requested a review from pierlon July 20, 2021 19:09
@westonruter westonruter added this to the v2.1.4 milestone Jul 20, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Jul 20, 2021

Plugin builds for d05beb7 are ready 🛎️!

'attr_spec_list' => array(
'data-src' => array(
'mandatory' => true,
'value_regex' => '\\d',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird regex but OK...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You found a bug!

Check out how what is supposed to be valid is invalid in the AMP Playground.

Nevertheless, the component initializes properly. To make it valid, I have to reduce the data-src to one single digit. See example.

Clearly this is wrong, as then the component fails to initialize.

I've opened ampproject/amphtml#35329 to fix this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I knew something was up! But I was pondering on how such a bug could slip through, as I thought that the tests would've caught something like that.

@swissspidy
Copy link
Collaborator

When is the next spec + plugin update planned after this?

ampproject/amphtml#35436 just got fixed in AMP and I'd love to include that in the Web Stories plugin in a month or so.

@westonruter
Copy link
Member Author

@swissspidy It's currently blocked by ampproject/amphtml#35329. Once that is merged we can do a 2.1.4 release next week.

@swissspidy
Copy link
Collaborator

So any chance ampproject/amphtml#35436 could be included in that update as well?

@westonruter
Copy link
Member Author

Yes, I'll make sure I update to the latest spec before merging.

@westonruter westonruter changed the title Update amphtml spec to 2107092322000 Update amphtml spec to ed0504b Aug 4, 2021
@westonruter westonruter merged commit 1df2991 into develop Aug 4, 2021
@westonruter westonruter deleted the update/amphtml-2106290147000 branch August 4, 2021 00:48
westonruter added a commit that referenced this pull request Aug 4, 2021
@westonruter westonruter self-assigned this Aug 30, 2021
@westonruter
Copy link
Member Author

QA Passed

I added the following to a Custom HTML block:

<amp-tiktok layout="responsive" height="575" width="325" data-src="https://www.tiktok.com/@scout2015/video/6718335390845095173">
	<blockquote class="tiktok-embed" cite="https://www.tiktok.com/@scout2015/video/6718335390845095173" data-video-id="6718335390845095173" placeholder>
		<section> <a target="_blank" title="@scout2015" href="https://www.tiktok.com/@scout2015">@scout2015</a>
		<p>Scramble up ur name &amp; I’ll try to guess it😍❤️ <a title="foryoupage" target="_blank" href="https://www.tiktok.com/tag/foryoupage">#foryoupage</a> <a title="PetsOfTikTok" target="_blank" href="https://www.tiktok.com/tag/PetsOfTikTok">#petsoftiktok</a> <a title="aesthetic" target="_blank" href="https://www.tiktok.com/tag/aesthetic">#aesthetic</a></p>
		<p> <a target="_blank" title="♬ original sound - tiff" href="https://www.tiktok.com/music/original-sound-6689804660171082501">♬ original sound – tiff</a> </p></section>
	</blockquote>
</amp-tiktok>

It appeared on a post without any validation error:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants