Make WordPress Core


Ignore:
Timestamp:
05/20/2016 04:53:40 AM (10 years ago)
Author:
pento
Message:

Emoji: Allow emoji in blogname and blogdescription on utf8 installs.

When the options table is set to utf8 instead of utf8mb4, emoji will be stripped from the blog name and description when they're saved. Instead of stripping them, they can be encode as HTML entities.

Fixes #36122.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r37431 r37469  
    37073707                case 'blogname':
    37083708                        $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
     3709                        if ( $value !== $original_value ) {
     3710                                $value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', wp_encode_emoji( $original_value ) );
     3711                        }
     3712
    37093713                        if ( is_wp_error( $value ) ) {
    37103714                                $error = $value->get_error_message();
Note: See TracChangeset for help on using the changeset viewer.