Make WordPress Core


Ignore:
Timestamp:
02/08/2024 08:40:37 AM (10 months ago)
Author:
gziolo
Message:

Editor: Avoid double escaping on value passed for attribute in HTML tag processor

Fix for the Block Bindings processing.
See https://github.com/WordPress/wordpress-develop/pull/5888#discussion_r1476793062.

Props: czapla, dmsnell, gziolo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-block.php

    r57526 r57561  
    377377                    return $block_content;
    378378                }
    379                 $amended_content->set_attribute( $block_type->attributes[ $attribute_name ]['attribute'], esc_attr( $source_value ) );
     379                $amended_content->set_attribute( $block_type->attributes[ $attribute_name ]['attribute'], $source_value );
    380380                return $amended_content->get_updated_html();
    381381                break;
Note: See TracChangeset for help on using the changeset viewer.