Sandboxing (Experimental)

As of version 2.2, it introduces flexible AMP with Bento. Now you can take advantage of Bento with an experimental plugin feature called sandboxing. You can keep non-AMP scripts from your site, and have the benefits to use Bento web components and take advantage of the capabilities focused on-page experience.

This feature is known as Sandboxing, now it is only available in Standard mode for the initial exploration. The sandboxing has three levels that will define the levels of flexibility to apply the AMP framework rules over your website. Initially, it would be set by default as Strict Mode, maintaining strict AMP validity. 

template mode section

Inside the AMP settings, the user as an administrator can adjust how flexible the validation requirements will be, adapting plugin enhancements  to per your site’s requirements

  1. Loose
  2. Moderate 
  3. Strict 
sandboxing levels

Loose Mode: In this level, the plugin will convert HTML markup to Bento components where possible (e.g. social embeds, videos, images), and then anything else it finds, for example, a custom script for a carousel, will be left in place. In other words, this level involves no sanitization (removal) of markup from the page. As such, this level should not break existing pages.

Moderate Mode: The second level introduces sanitization by stripping out markup that is not part of a Bento component, either a Bento AMP component or a custom 3rd party component.  Except for POST forms, excessive CSS, and other PX-verified markups will be kept in place.

Strict Mode: The third level is the strictest, and it corresponds to what is currently valid AMP. Only valid AMP components are allowed.

Additionally, in the initial sandboxing implementation, the level would largely be static. If you select Loose Mode, then that is the level that would be reflected on the rendered document. However, in a subsequent iteration, the sandboxing levels should dynamically adjust based on the content of the page. So if you selected Loose and yet there is no invalid AMP markup on the page, then it would automatically be upgraded to Strict.
Lastly, in future releases, we may allow the sandboxing levels to be used in non-Standard modes as well, in particular Reader mode.