Make WordPress Core

Opened 17 months ago

Closed 17 months ago

Last modified 12 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 17 months ago.
patch-1.diff (1.2 KB) - added by wildworks 17 months ago.
Add @since annotation for the function and fix typo in comment text of phpunit test

Download all attachments as: .zip

Change History (9)

@wildworks
17 months ago

#1 @wildworks
17 months ago

  • Keywords has-patch added

#2 @mukesh27
17 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
17 months ago

  • Milestone changed from Awaiting Review to 6.4

@wildworks
17 months ago

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

#4 @wildworks
17 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
17 months ago

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

#6 @SergeyBiryukov
17 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.

This ticket was mentioned in Slack in #core by youknowriad. View the logs.


12 months ago

Note: See TracTickets for help on using tickets.