-
Notifications
You must be signed in to change notification settings - Fork 383
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
Add full document sanitization in theme support #929
Conversation
* Sanitize the elements in the HEAD. * Deprecate get_body_node in favor of getting html or body element once and storing in var. * Add support for alternative attribute names in check for mandatory attributes. * Expand use of NAME_VALUE_DISPATCH for other value matching results.
This reduces a lot of complexity and as well as it fixes errors in the PHP-generation
…al link are present
Review In Progress Hi @westonruter, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
Made Minor Point
Hi @westonruter,
This pull request looks good. Phpize
seems to have simplified creating the PHP in amphtml-update.py
.
I made a minor point, but this is approved.
echo self::CUSTOM_STYLES_PLACEHOLDER; // WPCS: XSS OK. | ||
echo '</style>'; | ||
public static function add_amp_styles_placeholder() { | ||
echo self::STYLES_PLACEHOLDER; // WPCS: XSS OK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks to have the same output:
echo wp_kses_post( self::STYLES_PLACEHOLDER );
Of course, this is a minor point, and not a blocker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Since this is a constant it doesn't need escaping.
…ts once failure found
…d X-UA-Compatible content
* Remove newly-unused dispatch key constant. * Use integers for flags. * Use constants instead of string literals.
I absolutely love these changes ❤️ |
html
document not just the `body.amphtml-update.py
to use PHP for generation of array literals as opposed to using the previous buggy Python functions.<html>
element has theamp
attribute.Todo:
Fixes #875.