amp-toolbox-php icon indicating copy to clipboard operation
amp-toolbox-php copied to clipboard

Sanitizer: Initial implementation

Open schlessera opened this issue 3 years ago • 1 comments

The AMP Toolbox should include a sanitizer that is a pure PHP variant of the collection of sanitizers currently found in the AMP for WordPress plugin.

The general idea is that the Sanitizer should take regular HTML5 markup and make smart transformations to turn it into AMPHTML markup.

  • [ ] Build sanitizer pipeline, similar to optimizer pipeline (possible code reuse)
  • [ ] Port over generic sanitizers from https://github.com/ampproject/amp-wp
  • [ ] Build CLI command to sanitize a URL or a piece of markup
  • [ ] Optional: Build PSR-15 middleware to turn an HTML5 response into an AMPHTML response.

schlessera avatar May 13 '21 14:05 schlessera