diff --git a/extensions/amp-fx-collection/0.1/test/validator-amp-fx-collection.out b/extensions/amp-fx-collection/0.1/test/validator-amp-fx-collection.out index 7fbd407c0754..c4d7cb593d8b 100644 --- a/extensions/amp-fx-collection/0.1/test/validator-amp-fx-collection.out +++ b/extensions/amp-fx-collection/0.1/test/validator-amp-fx-collection.out @@ -95,4 +95,4 @@ PASS |

| | -| \ No newline at end of file +| diff --git a/validator/testdata/feature_tests/amp-action-macro.out b/validator/testdata/feature_tests/amp-action-macro.out index de8256791e48..e0e4809b733c 100644 --- a/validator/testdata/feature_tests/amp-action-macro.out +++ b/validator/testdata/feature_tests/amp-action-macro.out @@ -57,4 +57,3 @@ feature_tests/amp-action-macro.html:50:2 The mandatory attribute 'execute' is mi | | | - diff --git a/validator/validator-main.protoascii b/validator/validator-main.protoascii index 96f5122e3c9d..d1bf0be67dd1 100644 --- a/validator/validator-main.protoascii +++ b/validator/validator-main.protoascii @@ -26,7 +26,7 @@ min_validator_revision_required: 375 # 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 (validator-main.js) requires updating this revision id. -spec_file_revision: 829 +spec_file_revision: 835 styles_spec_url: "https://www.ampproject.org/docs/guides/author-develop/responsive/style_pages" script_spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags" @@ -3937,7 +3937,7 @@ tags { #
} blacklisted_value_regex: "__amp_source_origin" } - attr_lists: "name-attr" + attr_lists: "form-name-attr" } tags { # html_format: AMP @@ -3988,7 +3988,7 @@ tags { # } blacklisted_value_regex: "__amp_source_origin" } - attr_lists: "name-attr" + attr_lists: "form-name-attr" } # ACTIONS for POST identity token tags: { # @@ -4048,7 +4048,7 @@ tags: { # } blacklisted_value_regex: "__amp_source_origin" } - attr_lists: "name-attr" + attr_lists: "form-name-attr" } # AMP4EMAIL allows action-xhr and disallows action attribute. It also disallows # the use of mustache templates in action-xhr. The only allowed @@ -4085,7 +4085,7 @@ tags { # value_casei: "get" } attrs: { name: "novalidate" } - attr_lists: "name-attr" + attr_lists: "form-name-attr" } tags { # html_format: AMP4EMAIL @@ -4121,7 +4121,7 @@ tags { # dispatch_key: NAME_VALUE_DISPATCH } attrs: { name: "novalidate" } - attr_lists: "name-attr" + attr_lists: "form-name-attr" } # Will add verify state template if requested by users tags { @@ -4988,8 +4988,24 @@ attr_lists: { # Extended AMP globally optional tags. attr_lists: { name: "extended-amp-global" + attrs: { + enabled_by: "transformed" + name: "i-amphtml-layout" + value_casei: "container" + value_casei: "fill" + value_casei: "fixed" + value_casei: "fixed-height" + value_casei: "flex-item" + value_casei: "fluid" + value_casei: "intrinsic" + value_casei: "nodisplay" + value_casei: "responsive" + } attrs: { name: "media" } - attrs: { name: "noloading" value: "" } + attrs: { + name: "noloading" + value: "" + } } tags: { # html_format: AMP @@ -5274,6 +5290,358 @@ attr_lists: { } } +# Disallows document properties on "name" attribute for use on . +attr_lists: { + name: "form-name-attr" + attrs: { + name: "name" + blacklisted_value_regex: "(^|\\s)(" + "ATTRIBUTE_NODE|" + "CDATA_SECTION_NODE|" + "COMMENT_NODE|" + "DOCUMENT_FRAGMENT_NODE|" + "DOCUMENT_NODE|" + "DOCUMENT_POSITION_CONTAINED_BY|" + "DOCUMENT_POSITION_CONTAINS|" + "DOCUMENT_POSITION_DISCONNECTED|" + "DOCUMENT_POSITION_FOLLOWING|" + "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|" + "DOCUMENT_POSITION_PRECEDING|" + "DOCUMENT_TYPE_NODE|" + "ELEMENT_NODE|" + "ENTITY_NODE|" + "ENTITY_REFERENCE_NODE|" + "NOTATION_NODE|" + "PROCESSING_INSTRUCTION_NODE|" + "TEXT_NODE|" + "URL|" + "URLUnencoded|" + "__amp_\\S*|" + "__count__|" + "__defineGetter__|" + "__defineSetter__|" + "__lookupGetter__|" + "__lookupSetter__|" + "__noSuchMethod__|" + "__parent__|" + "__proto__|" + "__AMP_\\S*|" + "activeElement|" + "addEventListener|" + "adoptNode|" + "alinkColor|" + "all|" + "anchors|" + "append|" + "appendChild|" + "applets|" + "baseURI|" + "bgColor|" + "body|" + "captureEvents|" + "caretPositionFromPoint|" + "caretRangeFromPoint|" + "characterSet|" + "charset|" + "childElementCount|" + "childNodes|" + "children|" + "clear|" + "cloneNode|" + "close|" + "compareDocumentPosition|" + "compatMode|" + "constructor|" + "contains|" + "contentType|" + "cookie|" + "createAttribute|" + "createAttributeNS|" + "createCDATASection|" + "createComment|" + "createDocumentFragment|" + "createElement|" + "createElementNS|" + "createEvent|" + "createExpression|" + "createNSResolver|" + "createNodeIterator|" + "createProcessingInstruction|" + "createRange|" + "createTextNode|" + "createTreeWalker|" + "currentScript|" + "defaultView|" + "designMode|" + "dir|" + "dispatchEvent|" + "doctype|" + "documentElement|" + "documentURI|" + "domain|" + "elementFromPoint|" + "elementsFromPoint|" + "embeds|" + "enableStyleSheetsForSet|" + "evaluate|" + "execCommand|" + "execCommandShowHelp|" + "exitFullscreen|" + "exitPictureInPicture|" + "exitPointerLock|" + "fgColor|" + "firstChild|" + "firstElementChild|" + "focus|" + "fonts|" + "forms|" + "fullscreen|" + "fullscreenElement|" + "fullscreenEnabled|" + "getCSSCanvasContext|" + "getElementById|" + "getElementsByClassName|" + "getElementsByName|" + "getElementsByTagName|" + "getElementsByTagNameNS|" + "getOverrideStyle|" + "getRootNode|" + "getSelection|" + "hasChildNodes|" + "hasFocus|" + "hasOwnProperty|" + "hasStorageAccess|" + "head|" + "hidden|" + "images|" + "implementation|" + "importNode|" + "inputEncoding|" + "insertBefore|" + "isConnected|" + "isDefaultNamespace|" + "isEqualNode|" + "isPrototypeOf|" + "isSameNode|" + "l10n|" + "lastChild|" + "lastElementChild|" + "lastModified|" + "lastStyleSheetSet|" + "linkColor|" + "links|" + "location|" + "lookupNamespaceURI|" + "lookupPrefix|" + "mozCancelFullScreen|" + "mozFullScreen|" + "mozFullScreenElement|" + "mozFullScreenEnabled|" + "mozSetImageElement|" + "msCSSOMElementFloatMetrics|" + "msCapsLockWarningOff|" + "msElementsFromPoint|" + "msElementsFromRect|" + "nextSibling|" + "nodeName|" + "nodeType|" + "nodeValue|" + "normalize|" + "onabort|" + "onactivate|" + "onafterscriptexecute|" + "onanimationcancel|" + "onanimationend|" + "onanimationiteration|" + "onanimationstart|" + "onauxclick|" + "onbeforeactivate|" + "onbeforecopy|" + "onbeforecut|" + "onbeforedeactivate|" + "onbeforeinput|" + "onbeforepaste|" + "onbeforescriptexecute|" + "onblur|" + "oncancel|" + "oncanplay|" + "oncanplaythrough|" + "onchange|" + "onclick|" + "onclose|" + "oncontextmenu|" + "oncopy|" + "oncuechange|" + "oncut|" + "ondblclick|" + "ondeactivate|" + "ondrag|" + "ondragend|" + "ondragenter|" + "ondragexit|" + "ondragleave|" + "ondragover|" + "ondragstart|" + "ondrop|" + "ondurationchange|" + "onemptied|" + "onended|" + "onerror|" + "onfocus|" + "onfreeze|" + "onfullscreenchange|" + "onfullscreenerror|" + "ongotpointercapture|" + "oninput|" + "oninvalid|" + "onkeydown|" + "onkeypress|" + "onkeyup|" + "onload|" + "onloadeddata|" + "onloadedmetadata|" + "onloadend|" + "onloadstart|" + "onlostpointercapture|" + "onmousedown|" + "onmouseenter|" + "onmouseleave|" + "onmousemove|" + "onmouseout|" + "onmouseover|" + "onmouseup|" + "onmousewheel|" + "onmozfullscreenchange|" + "onmozfullscreenerror|" + "onmscontentzoom|" + "onmsgesturechange|" + "onmsgesturedoubletap|" + "onmsgestureend|" + "onmsgesturehold|" + "onmsgesturestart|" + "onmsgesturetap|" + "onmsinertiastart|" + "onmsmanipulationstatechanged|" + "onmssitemodejumplistitemremoved|" + "onmsthumbnailclick|" + "onpaste|" + "onpause|" + "onplay|" + "onplaying|" + "onpointercancel|" + "onpointerdown|" + "onpointerenter|" + "onpointerleave|" + "onpointerlockchange|" + "onpointerlockerror|" + "onpointermove|" + "onpointerout|" + "onpointerover|" + "onpointerup|" + "onprogress|" + "onratechange|" + "onreadystatechange|" + "onrejectionhandled|" + "onreset|" + "onresize|" + "onresume|" + "onscroll|" + "onsearch|" + "onseeked|" + "onseeking|" + "onselect|" + "onselectionchange|" + "onselectstart|" + "onshow|" + "onstalled|" + "onstop|" + "onsubmit|" + "onsuspend|" + "ontimeupdate|" + "ontoggle|" + "ontransitioncancel|" + "ontransitionend|" + "ontransitionrun|" + "ontransitionstart|" + "onunhandledrejection|" + "onvisibilitychange|" + "onvolumechange|" + "onwaiting|" + "onwebkitanimationend|" + "onwebkitanimationiteration|" + "onwebkitanimationstart|" + "onwebkitfullscreenchange|" + "onwebkitfullscreenerror|" + "onwebkitmouseforcechanged|" + "onwebkitmouseforcedown|" + "onwebkitmouseforceup|" + "onwebkitmouseforcewillbegin|" + "onwebkittransitionend|" + "onwheel|" + "open|" + "origin|" + "ownerDocument|" + "parentElement|" + "parentNode|" + "pictureInPictureElement|" + "pictureInPictureEnabled|" + "plugins|" + "pointerLockElement|" + "preferredStyleSheetSet|" + "prepend|" + "previousSibling|" + "propertyIsEnumerable|" + "queryCommandEnabled|" + "queryCommandIndeterm|" + "queryCommandState|" + "queryCommandSupported|" + "queryCommandText|" + "queryCommandValue|" + "querySelector|" + "querySelectorAll|" + "readyState|" + "referrer|" + "registerElement|" + "releaseCapture|" + "releaseEvents|" + "removeChild|" + "removeEventListener|" + "replaceChild|" + "requestStorageAccess|" + "rootElement|" + "scripts|" + "scrollingElement|" + "selectedStyleSheetSet|" + "styleSheetSets|" + "styleSheets|" + "textContent|" + "title|" + "toLocaleString|" + "toSource|" + "toString|" + "updateSettings|" + "valueOf|" + "visibilityState|" + "vlinkColor|" + "wasDiscarded|" + "webkitCancelFullScreen|" + "webkitCurrentFullScreenElement|" + "webkitExitFullscreen|" + "webkitFullScreenKeyboardInputAllowed|" + "webkitFullscreenElement|" + "webkitFullscreenEnabled|" + "webkitHidden|" + "webkitIsFullScreen|" + "webkitVisibilityState|" + "write|" + "writeln|" + "xmlEncoding|" + "xmlStandalone|" + "xmlVersion" + ")(\\s|$)" + } +} + # Not mandatory "name" attribute. attr_lists: { name: "name-attr" @@ -6145,20 +6513,6 @@ attr_lists: { marker: AUTOSCROLL } } - # Transformed AMP - attrs: { - enabled_by: "transformed" - name: "i-amphtml-layout" - value_casei: "container" - value_casei: "fill" - value_casei: "fixed" - value_casei: "fixed-height" - value_casei: "flex-item" - value_casei: "fluid" - value_casei: "intrinsic" - value_casei: "nodisplay" - value_casei: "responsive" - } } # Error Specificity: Used in the verbose validator to select between multiple