Skip to content

Commit 135f3dd

Browse files
committed
Add missing attribute decode when accessing raw class attribute HTML
1 parent cf42da8 commit 135f3dd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/wp-includes/html-api/class-wp-html-tag-processor.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,10 +2342,12 @@ private function class_name_updates_to_attributes_updates(): void {
23422342
}
23432343

23442344
if ( false === $existing_class && isset( $this->attributes['class'] ) ) {
2345-
$existing_class = substr(
2346-
$this->html,
2347-
$this->attributes['class']->value_starts_at,
2348-
$this->attributes['class']->value_length
2345+
$existing_class = WP_HTML_Decoder::decode_attribute(
2346+
substr(
2347+
$this->html,
2348+
$this->attributes['class']->value_starts_at,
2349+
$this->attributes['class']->value_length
2350+
)
23492351
);
23502352
}
23512353

0 commit comments

Comments
 (0)