-
Notifications
You must be signed in to change notification settings - Fork 385
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
#804 Update Allowed Tags And Attributes #823
Commits on Dec 5, 2017
-
804 : Update allowed AMP tags in sanitizer file.
Generate class-amp-allowed-tags-generated.php, Using amp_wp_build.py. Followed the instructions at the top of the file. This is spec file revision 527.
Ryan Kienstra committedDec 5, 2017 Configuration menu - View commit details
-
Copy full SHA for 0b987a6 - Browse repository at this point
Copy the full SHA 0b987a6View commit details -
804 : Prevent errors on amp_wp_build.py, update extensions dir.
Before, there was an error in: tag_spec.also_requires_tag This didn't always have the property. Also, update the directory of the extensions. The .protoascii file is no longer in the directory '0.1.'
Ryan Kienstra committedDec 5, 2017 Configuration menu - View commit details
-
Copy full SHA for 30064ca - Browse repository at this point
Copy the full SHA 30064caView commit details
Commits on Dec 6, 2017
-
Create is_mandatory_attribute_missing method
Ryan Kienstra committedDec 6, 2017 Configuration menu - View commit details
-
Copy full SHA for ba459a2 - Browse repository at this point
Copy the full SHA ba459a2View commit details
Commits on Dec 7, 2017
-
804 : Modify PHPUnit tests for tag and attribute validation.
Since the allowed tags and attributes are updated, Several assertions failed. Update them to reflect the new AMP spec. Since there is no longer a protocol whitelist, Remove the assertions for protocols.
Ryan Kienstra committedDec 7, 2017 Configuration menu - View commit details
-
Copy full SHA for 8cff768 - Browse repository at this point
Copy the full SHA 8cff768View commit details -
804 : Remove the requirement that 'data-multi-size' be empty.
This file was generated from a build script, In the repo https://github.com/ampproject/amphtml The spec file seems to require an empty value: extensions/amp-ad/validator-amp-ad.protoascii But examples of <amp-ad> seem to have the value. Like <amp-ad data-multi-size=320x50. @see examples/a4a-multisize.amp.html. So remove the line in the PHP file that requires it to be empty.
Ryan Kienstra committedDec 7, 2017 Configuration menu - View commit details
-
Copy full SHA for dd807a8 - Browse repository at this point
Copy the full SHA dd807a8View commit details -
804 : PHPUnit tests for newly-allowed tags.
Having generated a new file for the allowed tags and attributes, Add these to the data for test_sanitizer(). Also, add unit test for is_missing_mandatory_attribute(). And rename that function from: is_mandatory_attribute_missing().
Ryan Kienstra committedDec 7, 2017 Configuration menu - View commit details
-
Copy full SHA for a698eea - Browse repository at this point
Copy the full SHA a698eeaView commit details -
804 : Move logic for missing attributes.
Before, this was inside an 'else' block. And it should be outside of this, So it applies more broadly. If there is a list of attributes, and one is missing, Remove the node. This was the previous behavior.
Ryan Kienstra committedDec 7, 2017 Configuration menu - View commit details
-
Copy full SHA for a066117 - Browse repository at this point
Copy the full SHA a066117View commit details -
804 : Remove the unused $spec_value variable.
This was assigned a value that's used later. There's no need to store it in a variable.
Ryan Kienstra committedDec 7, 2017 Configuration menu - View commit details
-
Copy full SHA for cfcf730 - Browse repository at this point
Copy the full SHA cfcf730View commit details -
804 : Improve variable alignment and add PHPDoc tags.
There was some missing documentation. Add this for test_sanitizer and validate_tag_spec_for_node.
Ryan Kienstra committedDec 7, 2017 Configuration menu - View commit details
-
Copy full SHA for 8f0a925 - Browse repository at this point
Copy the full SHA 8f0a925View commit details -
804 : Exclude the generated allowed tags file from PHPCS checks.
This has hundreds of errors and warnings. It's generated from a Python script.
Ryan Kienstra committedDec 7, 2017 Configuration menu - View commit details
-
Copy full SHA for a400fa5 - Browse repository at this point
Copy the full SHA a400fa5View commit details -
804 : Align 'array' keywords vertically.
In response to the warnings in Travis. And align an equal sign in test_sanitizer().
Ryan Kienstra committedDec 7, 2017 Configuration menu - View commit details
-
Copy full SHA for cfc0247 - Browse repository at this point
Copy the full SHA cfc0247View commit details -
804 : Change the conditional to simply compare to true.
Before, there was a failed Travis build. This used boolval(), which caused a fatal error. Instead, simply compare the value to true.
Ryan Kienstra committedDec 7, 2017 Configuration menu - View commit details
-
Copy full SHA for 7f9a2db - Browse repository at this point
Copy the full SHA 7f9a2dbView commit details -
804 : Array and equal sign alignment fixes.
In response to a failed Travis build. Fix an error in an array not being aligned. An move an = sign 2 spaces to the left.
Ryan Kienstra committedDec 7, 2017 Configuration menu - View commit details
-
Copy full SHA for b4bfd81 - Browse repository at this point
Copy the full SHA b4bfd81View commit details -
804 : Prevent accessing an object as an array.
There was an error in the Travis build. A function accessed a DOMElement property as an array. Instead, use the setAttribute() method.
Ryan Kienstra committedDec 7, 2017 Configuration menu - View commit details
-
Copy full SHA for 6f5e39d - Browse repository at this point
Copy the full SHA 6f5e39dView commit details
Commits on Dec 8, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 2b1443e - Browse repository at this point
Copy the full SHA 2b1443eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c73f92b - Browse repository at this point
Copy the full SHA c73f92bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f67041d - Browse repository at this point
Copy the full SHA f67041dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 236968b - Browse repository at this point
Copy the full SHA 236968bView commit details
Commits on Dec 9, 2017
-
804 : Add a contributing.md file, with steps to use build script.
This describes how to use the new script amphtml-update.sh. This is mainly modified from another open-source file. It could probably use more information. Including the workflow for submitting pull requests.
Ryan Kienstra committedDec 9, 2017 Configuration menu - View commit details
-
Copy full SHA for eab6207 - Browse repository at this point
Copy the full SHA eab6207View commit details -
804 : Test that 'amp-playbuzz' is sanitized properly.
As harrisdavid mentioned, before this PR, the 'src' was mandatory. But with the updated AMP spec, it's not.
Ryan Kienstra committedDec 9, 2017 Configuration menu - View commit details
-
Copy full SHA for eef4b8b - Browse repository at this point
Copy the full SHA eef4b8bView commit details -
804 : Add allowed protocols to sanitization file.
Before, there was an issue in the file that created: class-amp-allowed-tags-generated.php. amphtml-update.sh had a conditional: if isinstance(value, list) But the allowed_protocol attribute has a type of: google.protobuf.internal.containers.RepeatedScalarFieldContainer So that conditional failed. And allowed_protocol wasn't added. So instead, make that an 'else' statement. That change only resulted in 'allowed_tags' being added.
Ryan Kienstra committedDec 9, 2017 Configuration menu - View commit details
-
Copy full SHA for ae92a58 - Browse repository at this point
Copy the full SHA ae92a58View commit details
Commits on Dec 11, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 4597be5 - Browse repository at this point
Copy the full SHA 4597be5View commit details -
804 : Add to contributing.md, including unit test information.
Add a point that this requires WP unit tests. Also, begin with the welcome that Thierry suggested. Props @ThierryA.
Ryan Kienstra committedDec 11, 2017 Configuration menu - View commit details
-
Copy full SHA for 44554c5 - Browse repository at this point
Copy the full SHA 44554c5View commit details -
Merge branch 'feature/804-allowed-tags' of https://github.com/Automat…
…tic/amp-wp into feature/804-allowed-tags
Ryan Kienstra committedDec 11, 2017 Configuration menu - View commit details
-
Copy full SHA for ed3c93d - Browse repository at this point
Copy the full SHA ed3c93dView commit details -
804 : Merge in develop, resolve conflicts.
In phpcs.xml, retain edits from both branches. There were several conflicts in: class-amp-tag-and-attribute-sanitizer.php These were mainly conflicts with 03c12. Some were only DocBlocks, but some were logic. I mainly resovled them in favor of this branch: feature/804-allowed-tags.
Ryan Kienstra committedDec 11, 2017 Configuration menu - View commit details
-
Copy full SHA for c3b28c0 - Browse repository at this point
Copy the full SHA c3b28c0View commit details
Commits on Dec 12, 2017
-
804 : Correct PHPUnit test for <script> validation.
When this has a type of 'application/json,' There is a required ancestor. So create an ancestor of <amp-analytics>.
Ryan Kienstra committedDec 12, 2017 Configuration menu - View commit details
-
Copy full SHA for 4b3ec53 - Browse repository at this point
Copy the full SHA 4b3ec53View commit details -
804 : Add spaces to correct PHPCS errors.
In response to a failed Travis build. Also, change == to ===.
Ryan Kienstra committedDec 12, 2017 Configuration menu - View commit details
-
Copy full SHA for af7b830 - Browse repository at this point
Copy the full SHA af7b830View commit details