Skip to content
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

Fix double escaping in blocks #37985

Merged
merged 4 commits into from
Jan 17, 2022
Merged

Fix double escaping in blocks #37985

merged 4 commits into from
Jan 17, 2022

Conversation

getdave
Copy link
Contributor

@getdave getdave commented Jan 14, 2022

Description

A few recent PRs were a little over zealous in escaping block PHP output. This PR seeks to revert some of these changes to bring them in line with the general consensus provided in various code reviews and also with that of WP Core. These include

  • not escaping translations (we trust those)
  • not escaping args to get_block_wrapper_attributes - this already handles it

How has this been tested?

  • Check all blocks work "as was"
  • Check all tests pass

Screenshots

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).
  • I've updated related schemas if appropriate.

@getdave getdave added [Type] Code Quality Issues or PRs that relate to code quality [Type] Security Related to security concerns or efforts labels Jan 14, 2022
@getdave getdave self-assigned this Jan 14, 2022
@getdave getdave requested a review from ajitbohra as a code owner January 14, 2022 16:48
@getdave getdave added [Block] Archives Affects the Archives Block [Block] Categories Affects the Categories Block [Block] RSS Affects the RSS Block - used to display entries from an RSS/Atom feed [Block] Search Affects the Search Block - used to display a search field labels Jan 14, 2022
@getdave getdave merged commit e069707 into trunk Jan 17, 2022
@getdave getdave deleted the fix/double-escaping-in-blocks branch January 17, 2022 08:50
@github-actions github-actions bot added this to the Gutenberg 12.5 milestone Jan 17, 2022
@Mamaduka Mamaduka mentioned this pull request Jan 21, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Archives Affects the Archives Block [Block] Categories Affects the Categories Block [Block] RSS Affects the RSS Block - used to display entries from an RSS/Atom feed [Block] Search Affects the Search Block - used to display a search field [Type] Code Quality Issues or PRs that relate to code quality [Type] Security Related to security concerns or efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants