Make WordPress Core


Ignore:
Timestamp:
01/20/2022 09:17:43 AM (2 years ago)
Author:
audrasjb
Message:

Administration: Properly handle HTML entities in the News & Events dashboard widget.

This change adds support for various HTML entities in the News & Events dashboard widget.

Props nickciske, kpegoraro, iandunn, shedonist, sayedulsayem, sabernhardt, audrasjb, SergeyBiryukov, ocean90.
Fixes #41208.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-community-events.php

    r51657 r52608  
    454454     * @since 4.9.7 Stick a WordCamp to the final list.
    455455     * @since 5.5.2 Accepts and returns only the events, rather than an entire HTTP response.
     456     * @since 6.0.0 Decode HTML entities from the event title.
    456457     *
    457458     * @param array $events The events that will be prepared.
     
    469470
    470471            if ( time() < $end_time ) {
     472                // Decode HTML entities from the event title.
     473                $event['title'] = html_entity_decode( $event['title'], ENT_QUOTES, 'UTF-8' );
     474
    471475                array_push( $future_events, $event );
    472476            }
Note: See TracChangeset for help on using the changeset viewer.