-
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
Extend Sandboxing experiment to Paired AMP modes #7268
Comments
This specifically has in mind this code: amp-wp/includes/validation/class-amp-validation-manager.php Lines 2035 to 2052 in 08906e4
Note the check for |
This can be seen by creating a post with the following content: <!-- wp:paragraph -->
<p>This is a script using <code>document.write()</code>:</p>
<!-- /wp:paragraph -->
<!-- wp:html -->
<script>document.write('HELLO WORLD');</script><noscript>SCRIPT WAS BLOCKED</noscript>
<!-- /wp:html --> If I then set template mode to Reader mode and enable loose sandboxing, I see: Notice how even though there is invalid AMP markup, it is not redirecting to the non-AMP page. (Actually, this should rather be tested when the user is logged-out, and indeed I see that is the case.) Instead the |
Feature Description
Currently the Sandboxing experiment is limited to Standard mode. This is because pages using the experiment are not valid AMP, meaning they will not get indexed. Nevertheless, invalid paired AMP pages are still useful for one important case: a mobile-optimized version of the site. When mobile redirection is enabled in particular, being able to serve pages using the AMP runtime and our optimizations (e.g. Reader theme) will enable the plugin to be usable as a "mobile theme" plugin.
link[rel=amphtml]
element but always outputlink[rel=alternate]
which is output when mobile redirection is enabled. The reason here is that we do not want to advertise to Googlebot in this case that there is an AMP page because then it will complain if there are validation errors.Acceptance Criteria
No response
Implementation Brief
No response
QA Testing Instructions
No response
Demo
No response
Changelog Entry
No response
The text was updated successfully, but these errors were encountered: