Make WordPress Core

Changeset 41336


Ignore:
Timestamp:
09/04/2017 07:37:37 PM (8 years ago)
Author:
ocean90
Message:

I18N: Allow numbers in locales during installation.

The current regex was a bit to strict for locales like pt_PT_ao90 which were already supported by wp_get_installed_translations().

Merge of [41335] to the 4.8 branch.

See #41794.

Location:
branches/4.8
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/4.8

  • branches/4.8/src/wp-admin/install.php

    r40320 r41336  
    280280$language = '';
    281281if ( ! empty( $_REQUEST['language'] ) ) {
    282     $language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
     282    $language = preg_replace( '/[^a-zA-Z0-9_]/', '', $_REQUEST['language'] );
    283283} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
    284284    $language = $GLOBALS['wp_local_package'];
  • branches/4.8/src/wp-admin/setup-config.php

    r38899 r41336  
    106106$language = '';
    107107if ( ! empty( $_REQUEST['language'] ) ) {
    108     $language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
     108    $language = preg_replace( '/[^a-zA-Z0-9_]/', '', $_REQUEST['language'] );
    109109} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
    110110    $language = $GLOBALS['wp_local_package'];
Note: See TracChangeset for help on using the changeset viewer.