You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move rel links and preconnect/preload/prefetch handling to AMP_Link_Sanitizer
Create AMP_Title_Sanitizer to deal with title tags (or include in AMP_Meta_Sanitizer?)
Move script re-ordering/deduplication and render-delaying logic to AMP_Script_Sanitizer
Move AMP runtime logic to AMP_Script_Sanitizer
Move custom style reordering logic in AMP_Style_Sanitizer
Move the AMP boilerplate logic into AMP_Style_Sanitizer
For the above, we might face an issue where we cannot do the ordering at the point in time where the particular sanitizer is run. In case we hit such an issue, we should still put the generation of said elements into the corresponding sanitizers, and then add a final AMP_Head_Sanitizer to go over the order of things in one go.
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered:
These sanitizers should be forcibly included among the list of sanitizers, in the same way that we currently force AMP_Style_Sanitizer and AMP_Tag_And_Attribute_Sanitizer to always be included and always run at the end.
As we discussed previously, the sanitizers that come out of this should align with the Transformers as outlined in the AMP SSR Toolkit Implementation Guide.
Feature description
The code found in
AMP_Theme_Support::ensure_required_markup()
does a lot, and does it after the sanitizers have run:amp-wp/includes/class-amp-theme-support.php
Lines 1526 to 1542 in 3b70f6d
This code should be refactored into separated sanitizers so that all of that work is part of what the sanitizers do.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
AMP_Theme_Support::ensure_required_markup()
can be removed as it is not needed anymore.Implementation brief
AMP_Meta_Sanitizer
to deal with meta tags => WIP PR: Add AMP_DOM_Document & meta tag sanitizer #3758AMP_Script_Sanitizer
AMP_Link_Sanitizer
AMP_Title_Sanitizer
to deal with title tags (or include inAMP_Meta_Sanitizer
?)AMP_Script_Sanitizer
AMP_Script_Sanitizer
AMP_Style_Sanitizer
AMP_Style_Sanitizer
For the above, we might face an issue where we cannot do the ordering at the point in time where the particular sanitizer is run. In case we hit such an issue, we should still put the generation of said elements into the corresponding sanitizers, and then add a final
AMP_Head_Sanitizer
to go over the order of things in one go.QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: