Skip to content

Style sanitizer contains a piece of logic that doesn't seem to have any effect #3232

@schlessera

Description

@schlessera

The style sanitizer contains piece of logic that stores "$indices_by_stylesheet_element_id". However, the entire array is only assembled, but never used.

// Keep track of the element IDs for the stylesheets.
if ( $pending_stylesheet['node'] instanceof DOMElement && $pending_stylesheet['node']->hasAttribute( 'id' ) ) {
$indices_by_stylesheet_element_id[ $pending_stylesheet['node']->getAttribute( 'id' ) ] = $pending_stylesheet_index;
}

This entire snippet could just be removed, to save processing time and memory.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions