Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#61536 closed defect (bug) (fixed)

Add opacity as an allowed attribute to safecss_filter_attr()

Reported by: sunil25393 Owned by: SergeyBiryukov
Priority: normal Milestone: 6.7
Component: Formatting Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

Updated the overlay control to accept any value from 1 to 100 rather than multiples of 10. To accomplish this, we introduced an inline opacity style to block. However, because the safecss_filter_attr() method does not allow this property, it will be erased when inline styles are output using the get_block_wrapper_attributes() function, for example.

This ticket is for tracking the PHP backport for the following Gutenberg PR: ​https://github.com/WordPress/gutenberg/pull/59891

Change History (5)

This ticket was mentioned in ​PR #6943 on ​WordPress/wordpress-develop by ​@sunil25393.


2 years ago
#1

  • Keywords has-unit-tests added

#2 @sunil25393
2 years ago

  • Keywords has-unit-tests removed

#3 @SergeyBiryukov
2 years ago

  • Milestone Awaiting Review → 6.7
  • Owner set to SergeyBiryukov
  • Status new → reviewing

#4 @SergeyBiryukov
2 years ago

  • Resolution → fixed
  • Status reviewing → closed

In 58709:

KSES: Add opacity to the list of safe CSS properties.

Original PR from Gutenberg repository:

Reference: ​MDN Web Docs: opacity.

Props sunil25393, wildworks, poena, Mamaduka, presstoke.
Fixes #61536.

​@SergeyBiryukov commented on ​PR #6943:


2 years ago
#5

Thanks for the PR! Merged in r58709.

Note: See TracTickets for help on using tickets.