mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@52608 git-svn-id: http://core.svn.wordpress.org/trunk@52196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f8c10a28f5
commit
d4306e8d8a
@ -453,6 +453,7 @@ class WP_Community_Events {
|
||||
* @since 4.8.0
|
||||
* @since 4.9.7 Stick a WordCamp to the final list.
|
||||
* @since 5.5.2 Accepts and returns only the events, rather than an entire HTTP response.
|
||||
* @since 6.0.0 Decode HTML entities from the event title.
|
||||
*
|
||||
* @param array $events The events that will be prepared.
|
||||
* @return array The response body with events trimmed.
|
||||
@ -468,6 +469,9 @@ class WP_Community_Events {
|
||||
$end_time = (int) $event['end_unix_timestamp'];
|
||||
|
||||
if ( time() < $end_time ) {
|
||||
// Decode HTML entities from the event title.
|
||||
$event['title'] = html_entity_decode( $event['title'], ENT_QUOTES, 'UTF-8' );
|
||||
|
||||
array_push( $future_events, $event );
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-alpha-52607';
|
||||
$wp_version = '6.0-alpha-52608';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user