Skip to content
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

Sanitizer: Initial implementation #195

Open
4 tasks
schlessera opened this issue May 13, 2021 · 1 comment
Open
4 tasks

Sanitizer: Initial implementation #195

schlessera opened this issue May 13, 2021 · 1 comment

Comments

@schlessera
Copy link
Collaborator

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.
@westonruter
Copy link
Member

As a concrete outcome for this effort we should consider at least the code from the AMP plugin which is copied into the Web Stories plugin, so the Web Stories dependency on the AMP plugin can be eliminated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants