-
Notifications
You must be signed in to change notification settings - Fork 384
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
Embed fallbacks #493
Embed fallbacks #493
Commits on Sep 27, 2016
-
Sanitize audio/video: update source attributes
Both the audio and video sanitizers use the same routine to iterate through the source elements within the main node and filter/sanitize their attributes. However, the filtered attributes are not added back to the source element before it is appended to the new amp-audio or amp-video element. This is problematic when the attribute filtering method converts URLs from http to https, but the converted URL does not make it back into the source element. This commit addresses the issue by updating each source element's attributes before it is appended.
Configuration menu - View commit details
-
Copy full SHA for 2c11b6a - Browse repository at this point
Copy the full SHA 2c11b6aView commit details
Commits on Sep 28, 2016
-
Fallbacks: Replace invalid audio/video element with fallback element
If an audio or video element, or its source child element, has a src URL, but it is invalid (eg it uses the http protocol instead of https), this creates a fallback blockquote element to replace the original that explains that the media could not be loaded.
Configuration menu - View commit details
-
Copy full SHA for 696d1d0 - Browse repository at this point
Copy the full SHA 696d1d0View commit details
Commits on Sep 29, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 3832b59 - Browse repository at this point
Copy the full SHA 3832b59View commit details -
Fallbacks: Replace invalid iframe element with fallback element
Creates a fallback blockquote element to replace an iframe that doesn't have a valid src attribute.
Configuration menu - View commit details
-
Copy full SHA for 9e02d56 - Browse repository at this point
Copy the full SHA 9e02d56View commit details -
Maybe set https scheme on URLs with relative protocols
For a URL with a relative protocol, such as //www.youtube.com/watch?v=dQw4w9WgXcQ ...the assumption is that either http or https will work with it. Since AMP requires https, we should go ahead and add the https scheme to these during filtering, if the sanitizer is configured to require or force the protocol.
Configuration menu - View commit details
-
Copy full SHA for e5a6253 - Browse repository at this point
Copy the full SHA e5a6253View commit details -
Configuration menu - View commit details
-
Copy full SHA for a689a2c - Browse repository at this point
Copy the full SHA a689a2cView commit details
Commits on Oct 6, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 2365364 - Browse repository at this point
Copy the full SHA 2365364View commit details -
In the previous commit I removed the embed-specific class name from the abstracted `create_fallback_node` method, but forgot to update the tests
Configuration menu - View commit details
-
Copy full SHA for b1077d6 - Browse repository at this point
Copy the full SHA b1077d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for f7dafe5 - Browse repository at this point
Copy the full SHA f7dafe5View commit details