Changeset 51183
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php
r51175 r51183 215 215 216 216 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' ) ); 218 218 } 219 219 220 220 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' ) ); 222 222 } 223 223 -
trunk/tests/phpunit/tests/rest-api/rest-widget-types-controller.php
r51174 r51183 207 207 wp_register_sidebar_widget( 208 208 $widget_id, 209 ' Legacy ‑ Archive ‑ Widget',209 '‘Legacy ‑ Archive ‑ Widget’', 210 210 function() {}, 211 211 array( 212 'description' => ' A great & interesting archive of your site’s posts!',212 'description' => '“A great & interesting archive of your site’s posts!”', 213 213 ) 214 214 ); … … 216 216 $response = rest_get_server()->dispatch( $request ); 217 217 $data = $response->get_data(); 218 $this->assertSame( ' Legacy ‑ Archive ‑ Widget', $data['name'] );219 $this->assertSame( ' A great & interesting archive of your site’s posts!', $data['description'] );218 $this->assertSame( '‘Legacy ‑ Archive ‑ Widget’', $data['name'] ); 219 $this->assertSame( '“A great & interesting archive of your site’s posts!”', $data['description'] ); 220 220 } 221 221
Note: See TracChangeset
for help on using the changeset viewer.