Make WordPress Core

Opened 22 months ago

Closed 22 months ago

Last modified 22 months ago

#57664 closed enhancement (fixed)

Add aspect-ratio as valid CSS property in kses

Reported by: ajlende's profile ajlende Owned by: audrasjb's profile audrasjb
Milestone: 6.2 Priority: normal
Severity: normal Version:
Component: Formatting Keywords: has-patch needs-dev-note has-unit-tests
Focuses: Cc:

Description

For WordPress/gutenberg#47854, we are adding aspect-ratio for the featured image block and want the user-input for the aspect ratio value to pass through kses like the rest of the values.

Change History (15)

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


22 months ago
#1

  • Keywords has-patch added

Adds aspect-ratio to safe_style_css list of properties.

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

@ajlende commented on PR #4032:


22 months ago
#2

Are you able to add aspect ration to the @since 6.2.0 annotation for the function

@peterwilsoncc Done!

#3 @peterwilsoncc
22 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 6.2

I've approved the linked pull request for commit.

My reading of WordPress/gutenberg#38990 is that this is required for WordPress 6.2, so I've moved it on to the milestone.

Please correct me if it can wait until WordPress 6.3.

#4 @audrasjb
22 months ago

I approve this for 6.2 inclusion.
It's a very small, safe change, and also it may indeed be a must have for 6.2.

#5 @audrasjb
22 months ago

  • Keywords needs-dev-note added

Also, this would deserve a quick mention in the Misc change dev note, alongside [55184].

#6 @audrasjb
22 months ago

  • Owner set to audrasjb
  • Status changed from new to accepted

#7 @audrasjb
22 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 55309:

Formatting: Add aspect-ratio as valid CSS property in KSES.

This changeset adds support for the aspect-ratio CSS property, which is considered safe for inline CSS.

Props ajlende, peterwilsoncc.
Fixes #57664.

@audrasjb commented on PR #4032:


22 months ago
#8

committed in https://core.trac.wordpress.org/changeset/55309, with a couple modifications

#9 @desrosj
22 months ago

  • Keywords needs-unit-tests added; commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Could we add a test or two for this new property? [55184] included tests but this one did not.

#10 @desrosj
22 months ago

  • Component changed from General to Formatting

Also, moving this to the Formatting component to match the commit message description and #57504.

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


22 months ago
#11

  • Keywords has-unit-tests added; needs-unit-tests removed

This PR adds tests to the aspect-ratio CSS property in KSES since this property was added as safe for inline CSS.

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

@mukesh27 commented on PR #4134:


22 months ago
#12

@desrosj can you please review this when you get moment?

#13 @peterwilsoncc
22 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 55430:

Formatting: Add aspect-ratio tests for safecss_filter_attr().

Follow up to [55309].

Props rahmohn, desrosj, mukesh27.
Fixes #57664.

Note: See TracTickets for help on using tickets.