Remove escaping of title in legacy post templates#5026
Merged
westonruter merged 1 commit intodevelopfrom Jul 11, 2020
Merged
Conversation
Contributor
|
Plugin builds for cd9085a are ready 🛎️!
|
westonruter
added a commit
that referenced
this pull request
Jul 11, 2020
westonruter
added a commit
that referenced
this pull request
Jul 12, 2020
…eme-support-paired-default * 'develop' of github.com:ampproject/amp-wp: Update dependency dealerdirect/phpcodesniffer-composer-installer to v0.7.0 Harden ReaderThemesTest when custom theme directories present Update dependency sirbrillig/phpcs-variable-analysis to v2.8.3 Skip test in WP 4.9 Fix grammar typo Remove escaping of title in legacy post templates (#5026) Skip test when Twenty Twenty is not installed Prevent Cover Template section in AMP Customizer from appearing when Twenty Twenty used as Reader theme Add is_theme_overridden method on ReaderThemeLoader service Improve detection for whether or not ReaderThemeSwitcher is enabled Make ReaderThemeLoaer unconditional and add method to obtain originally-active theme Prevent sanitization of common style elements in the Customizer preview Fix lint issue in test Fix lint issue Add test Prevent sanitization of styles in some Core themes requried for some Customizer features to work correctly
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
Given a post with an emoji in the title:
The title was getting erroneously escaped in the
h1of the legacy post templates:This PR removes the escaping to prevent that from happening:
Note that escaping is not required necessary for two reasons:
the_title()because it can include markup; the value returned by$this->get( 'post_title' )comes fromget_the_title( $this->post ).This issue was introduced a long time ago in 6b4de15 with this change:
Originally reported by @delans on Twitter.
Checklist