From 3afbb1147d4b55049bddd44cea85d45de4d4197c Mon Sep 17 00:00:00 2001 From: Greg Grothaus Date: Wed, 16 Dec 2015 17:02:39 -0800 Subject: [PATCH] AMP Validator. Whitelist new meta tag for amp-access. --- validator/validator.protoascii | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/validator/validator.protoascii b/validator/validator.protoascii index 5347eb465c36..5e34b25394a8 100644 --- a/validator/validator.protoascii +++ b/validator/validator.protoascii @@ -25,7 +25,7 @@ min_validator_revision_required: 67 # newer versions of the spec file. This is currently a Google internal # mechanism, validator.js does not use this facility. However, any # change to this file requires updating this revision id. -spec_file_revision: 98 +spec_file_revision: 99 # Rules for AMP HTML # (https://github.com/google/amphtml/blob/master/spec/amp-html-format.md). # These rules are just enough to validate the example from the spec. @@ -425,6 +425,24 @@ tags: { mandatory: true } } +# AMP-specific extension: +# Publishers may set this meta tag to indicate premium content. If present, +# Google's AMP Cache will only serve this content when Referer is *.google.com. +tags: { + name: "meta" + unique: true + mandatory_parent: "head" + attrs: { + name: "http-equiv" + mandatory: true + value: "amp-access" + } + attrs: { + name: "content" + mandatory: true + value: "premium" + } +} # 4.2.6 The style # Text contents of the style tag will be validated seperately. tags: { # Special custom 'author' spreadsheet.