Merged
Conversation
…le_Sanitizer Run !important and overflow removal logic on inlined external stylesheets as well as style elements and style attributes. See #927.
…g comments, as otherwise invalid
ThierryA
previously approved these changes
Feb 6, 2018
|
|
||
| $guessurl = site_url(); | ||
| if ( ! $guessurl ) { | ||
| $guessurl = wp_guess_url(); |
Collaborator
There was a problem hiding this comment.
I did not know that function, nice!
Member
Member
Author
ThierryA
approved these changes
Feb 6, 2018
2ea228c to
7452b00
Compare
…element textContent
7452b00 to
4f61eef
Compare
Member
Author
|
Wow, that was one of the most obscure things I've ever had to debug. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WP_Stylesin favor of consolidating logic inAMP_Style_Sanitizer. This ensures that plugins that printlinktags directly will automatically get them included. The same goes forstyleelements that a plugin prints.styleelements now get concatenated in document order to ensure proper cascade.!importantand overflow removal logic on inlined external stylesheets as well as style elements and style attributes.!importantdoes not appear anywhere in CSS, including comments, as otherwise invalid and entire CSS gets stripped by whitelist sanitizer.Fixes #927. However, the longer-term fixes will need to be done as part of #930. This PR lays the groundwork for #930.