Make WordPress Core

Opened 4 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#66101 closed enhancement (duplicate)

Icons: Allow stroke-related attributes in the icon registry sanitizer

Reported by: wildworks Owned by:
Priority: normal Milestone:
Component: Editor Version:
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description

Since ​https://github.com/WordPress/gutenberg/pull/78808, icons in the icon library are being redrawn as stroke-based SVGs.

WP_Icons_Registry::sanitize_icon_content() does not allow some of the attributes those icons need in order to render. wp_kses() therefore strips them before the icon is stored or returned, and the icons no longer render correctly.

Gutenberg added the necessary attributes to its own sanitizer in the same PR, and the equivalent ones need to be added to the icon registry in core.

A more fundamental rework of the sanitizer is being explored in ​https://github.com/WordPress/gutenberg/pull/75550 and ​https://github.com/WordPress/wordpress-develop/pull/12197. This ticket is deliberately scoped to the minimal fix needed for the 7.2 release; the broader approach can land separately.

Change History (6)

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


4 weeks ago
#1

  • Keywords has-patch has-unit-tests added

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

## Use of AI Tools

  • Yes
  • Claude Code, Opus 5.
  • Used for writing unit tests for the PR and changes.

#2 @hbhalodia
4 weeks ago

Hi @wildworks, I have raised the PR to copy the changes and the new atributes that were added in the Upstream GB PR. Have also added the unit test cases for the same. Would appreciate your review on the PR.

Thanks,

#3 @hbhalodia
4 weeks ago

Hi @wildworks, Do the current ticket needed the support to add more additional attributes that are being added tracked and added by ​Issue and ​PR in Upstream?

#4 @wildworks
4 weeks ago

@hbhalodia, Please bear with me while I consider how to organize the PR.

#5 @wildworks
4 weeks ago

  • Milestone 7.2
  • Resolution → duplicate
  • Status new → closed

Upon further consideration, I am closing this ticket as a duplicate of #65795 to avoid splitting our efforts.

​@wildworks commented on ​PR #13512:


4 weeks ago
#6

Upon further consideration, I am closing this ticket as a duplicate of #65795 to avoid splitting our efforts. Sorry for the confusion.

Note: See TracTickets for help on using tickets.