Convert head[profile] attribute to link[rel=profile]#4193
Merged
westonruter merged 5 commits intodevelopfrom Jan 29, 2020
Merged
Convert head[profile] attribute to link[rel=profile]#4193westonruter merged 5 commits intodevelopfrom
head[profile] attribute to link[rel=profile]#4193westonruter merged 5 commits intodevelopfrom
Conversation
Like Weston mentioned, that was invalid HTML5, so convert it to a link[rel=profile].
Contributor
Author
|
@todo: consider a case where there is both a |
For example, Twenty Twenty has a link[rel=profile], though it doesn't have a head[profile].
westonruter
requested changes
Jan 29, 2020
westonruter
reviewed
Jan 29, 2020
Using Weston's suggested code, handle this case.
westonruter
approved these changes
Jan 29, 2020
Member
Nice. I didn't notice that Twenty Twenty had this. Added validation that the normalization here is the right approach. |
3 tasks
schlessera
added a commit
that referenced
this pull request
Mar 7, 2020
westonruter
added a commit
that referenced
this pull request
Mar 7, 2020
…nt/4326-tiktok-embed * 'develop' of github.com:ampproject/amp-wp: Fix ZIP build after namespace rename Add missing namespace to common lib tests Fix phpcs issues in common and optimizer libs; include tests dir in cs/cbf scripts Fix and harden normalizeDomStructure when document lacks <html> Move any nodes appearing after </body> to be appended to the body Skip moving comments outside of html tags Merge changes from #4193 Merge changes into moved Dom\Document class Change root namespace for all three packages Deal with whitespace around comments Preserve comment positions (without breaking structure) Update src/Dom/Document.php Support content after html end tag
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.
Summary
Like Weston mentioned,
head[profile]is invalid, so this converts it to alink[rel=profile].To test this, I made this change in Twenty Twenty:
...and with this PR, the
head[profile]is stripped and moved to a newhead > link[rel=profile]:In the unlikely case that there's already a
head > link[rel=profile], this doesn't create a new one. It simply strips thehead[profile]if it exists.Fixes #4131
Checklist