WordPress.org

Making WordPress.org

Changeset 5540


Ignore:
Timestamp:
06/05/2017 10:52:11 PM (4 years ago)
Author:
iandunn
Message:

Events: Split location by any whitespace character, including Unicode

This will match more valid input than simply checking for a single space character.

See #2823
Props dd32

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/events/1.0/index.php

    r5539 r5540  
    676676    $country             = get_country_from_name( $location_name );
    677677    $location_word_count = str_word_count( $location_name );
    678     $location_name_parts = explode( ' ', $location_name );
     678    $location_name_parts = preg_split( '/\s+/u', $location_name );
    679679
    680680    /*
Note: See TracChangeset for help on using the changeset viewer.