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

Let whitelist sanitizer dictate the required AMP scripts via spec #882

Merged
merged 5 commits into from
Jan 19, 2018

Commits on Jan 19, 2018

  1. Include requires_extension from spec in AMP_Allowed_Tags_Generated

    * Use spec to determine which script components get enqueued
    * Use the latest component instead of 0.1
    * Reduce duplicated logic by defining get_scripts() method on base sanitizer
    * Add get_allowed_tag_data method on AMP_Allowed_Tags_Generated to reduce size of array passing.
    * Define sanitized_tag class variable on sanitizer classes
    westonruter committed Jan 19, 2018
    Configuration menu
    Copy the full SHA
    26c53c1 View commit details
    Browse the repository at this point in the history
  2. Discover required AMP component scripts through whitelist sanitization

    Include also_requires_tag_warning in AMP_Allowed_Tags_Generated
    westonruter committed Jan 19, 2018
    Configuration menu
    Copy the full SHA
    33967f3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    237c25b View commit details
    Browse the repository at this point in the history
  4. Remove obsolete sanitizer get_scripts method implementations

    Now the scripts are obtained via the whitelist sanitizer alone, so there is no need for the redundancy of obtaining the component scripts via the individual sanitizers or to duplicate the component lookup via a get_allowed_tag_data method.
    westonruter committed Jan 19, 2018
    Configuration menu
    Copy the full SHA
    c62dad6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bde2388 View commit details
    Browse the repository at this point in the history