Make WordPress Core

Opened 3 months ago

Closed 3 months ago

#59387 closed defect (bug) (fixed)

Add writing-mode as an allowed attribute to safecss_filter_attr()

Reported by: wildworks's profile wildworks Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.4 Priority: normal
Severity: normal Version:
Component: Formatting Keywords: has-patch
Focuses: Cc:

Description

#59306 added writing-mode to the typography support. However, this property is not allowed by safecss_filter_attr() function, so this property will be removed when outputting inline styles with 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/54581

Attachments (2)

patch.diff (819 bytes) - added by wildworks 3 months ago.
patch-1.diff (1.2 KB) - added by wildworks 3 months ago.
Add @since annotation for the function and fix typo in comment text of phpunit test

Download all attachments as: .zip

Change History (8)

@wildworks
3 months ago

#1 @wildworks
3 months ago

  • Keywords has-patch added

#2 @mukesh27
3 months ago

  • Keywords needs-refresh added

@wildworks thanks for ticket and patch.

Could you please document since annotation for the function?

* @since 6.4.0 Added support for `writing-mode`.

#3 @mukesh27
3 months ago

  • Milestone changed from Awaiting Review to 6.4

@wildworks
3 months ago

Add @since annotation for the function and fix typo in comment text of phpunit test

#4 @wildworks
3 months ago

I submitted patch-1.diff with added @since annotation.

There was a typo in the comment text of the phpunit test, so I fixed it at the same time (// Wiritng mode introduced in 6.4. > // Writing mode introduced in 6.4.).

#5 @SergeyBiryukov
3 months ago

  • Component changed from General to Formatting
  • Keywords needs-refresh removed
  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

#6 @SergeyBiryukov
3 months ago

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

In 56617:

KSES: Add writing-mode to the list of safe CSS properties.

Original PR from Gutenberg repository:

Reference: MDN Web Docs: writing-mode.

Follow-up to [56605].

Props wildworks, mukesh27, poena, andrewserong.
Fixes #59387.

Note: See TracTickets for help on using tickets.