Make WordPress Core

Opened 5 weeks ago

Last modified 5 weeks ago

#62372 new defect (bug)

Fix theme.json removal of insecure properties for block style variations

Reported by: aaronrobertshaw's profile aaronrobertshaw Owned by:
Milestone: 6.8 Priority: normal
Severity: normal Version: 6.7
Component: Editor Keywords: gutenberg-merge has-patch has-unit-tests
Focuses: Cc:

Description

This ticket tracks the backporting of PHP files for the following Gutenberg updates:

These changes prevent valid inner block type and element styles from being stripped out of block style variations via remove_insecure_properties.

Change History (1)

This ticket was mentioned in PR #7759 on WordPress/wordpress-develop by @aaronrobertshaw.


5 weeks ago
#1

  • Keywords has-patch has-unit-tests added

This PR backports the PHP changes from https://github.com/WordPress/gutenberg/pull/66896

These changes prevent valid inner block type and element styles from being stripped out of block style variations via remove_insecure_properties.

Trac ticket: https://core.trac.wordpress.org/ticket/62372

#### Testing Instructions

  1. Ensure unit tests are passing
  2. Using a multisite install, login with a user that has access to the Site Editor but doesn't have unfiltered_html caps e.g. site admin
  3. Activate a theme that within a theme style variation defines a block style variation containing inner block and element styles
  4. Navigate to Appearance > Editor
  5. Edit a page or template and apply the block style variation from step 3
  6. Save changes
  7. Apply the theme style variation identified in step 3.
  8. Re-save changes and switch to the frontend
  9. Confirm that the block with the block style variation applied gets the correct styles defined within the theme style variation.

More detailed instructions testing with the Assembler block theme can be found on the original Gutenberg PR. It also has some test block markup.

Note: See TracTickets for help on using tickets.