WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/04/2017 07:29:50 PM (3 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().

Fixes #41794.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/install.php

    r41289 r41335  
    282282$language = '';
    283283if ( ! empty( $_REQUEST['language'] ) ) {
    284     $language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
     284    $language = preg_replace( '/[^a-zA-Z0-9_]/', '', $_REQUEST['language'] );
    285285} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
    286286    $language = $GLOBALS['wp_local_package'];
Note: See TracChangeset for help on using the changeset viewer.