-
Notifications
You must be signed in to change notification settings - Fork 383
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
Add script sanitizer to convert the most common scripts to AMP #1032
Comments
As part of the script sanitizer this we could potentially look at de-duplicating validation errors that are currently coming when you enqueue some JS. For example, when enqueueing
The first is coming from when the script is first enqueued and the second comes from the whitelist sanitizer when the script is actually removed. This is due to the fact that the |
This is being added in 811d133#diff-7d234989187d87a372e2aa6aa1299a71R672 via #1093. |
It will be important to also make sure any |
@amedina Here's another bit of code that should be moved into the new |
Adding support for |
Closing per resolution in #1127 (comment) |
WordPress users very commonly add script tags to Custom HTML widgets and directly to theme templates to show ads, add analytics, etc. Assuming that the vast majority of these scripts are very templated (e.g. including via Google Tag Manager), then it should be possible to reliably identify the each script and extract the relevant information to convert to AMP.
See also #1031 which could serve as a way to build up a database of scripts for prioritization.
The text was updated successfully, but these errors were encountered: