[2.3] Fixed system report in WordPress 2.4 with emojis

@mikejolley
This commit is contained in:
Claudio Sanches 2015-04-27 18:12:46 -03:00
parent dd8b2f6007
commit 4441436618
1 changed files with 3 additions and 1 deletions

View File

@ -756,7 +756,9 @@ if ( ! defined( 'ABSPATH' ) ) {
var label = jQuery( this ).find( 'td:eq(0)' ).data( 'export-label' ) || jQuery( this ).find( 'td:eq(0)' ).text();
var the_name = jQuery.trim( label ).replace( /(<([^>]+)>)/ig, '' ); // Remove HTML
var the_value = jQuery.trim( jQuery( this ).find( 'td:eq(2)' ).text() );
var image = jQuery( this ).find( 'td:eq(2)' ).find( 'img' ); // Get WP 4.2 emojis
var prefix = ( undefined === image.attr( 'alt' ) ) ? '' : image.attr( 'alt' ) + ' '; // Remove WP 4.2 emojis
var the_value = jQuery.trim( prefix + jQuery( this ).find( 'td:eq(2)' ).text() );
var value_array = the_value.split( ', ' );
if ( value_array.length > 1 ) {