Make WordPress Core


Ignore:
Timestamp:
06/18/2021 03:51:26 PM (5 years ago)
Author:
SergeyBiryukov
Message:

REST API: Decode single and double quote entities in widget names and descriptions.

Follow-up to [51174], [51175].

Props ocean90, ramonopoly.
Fixes #53407.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php

    r51175 r51183  
    215215
    216216                        if ( isset( $widget['name'] ) ) {
    217                                 $widget['name'] = html_entity_decode( $widget['name'] );
     217                                $widget['name'] = html_entity_decode( $widget['name'], ENT_QUOTES, get_bloginfo( 'charset' ) );
    218218                        }
    219219
    220220                        if ( isset( $widget['description'] ) ) {
    221                                 $widget['description'] = html_entity_decode( $widget['description'] );
     221                                $widget['description'] = html_entity_decode( $widget['description'], ENT_QUOTES, get_bloginfo( 'charset' ) );
    222222                        }
    223223
Note: See TracChangeset for help on using the changeset viewer.