Make WordPress Core

Changeset 25955


Ignore:
Timestamp:
10/27/2013 08:52:20 PM (11 years ago)
Author:
nacin
Message:

Query stopwords: Only eliminate single A-Z letters as search terms.

Merges [25954] to the 3.7 branch.

Stop trying to match any single letters that are not East Asian characters, as this requires PCRE with UTF-8 support; and because it doesn't actually work.

fixes #25709.

Location:
branches/3.7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7

  • branches/3.7/src

  • branches/3.7/src/wp-includes/query.php

    r25890 r25955  
    19871987                $term = trim( $term, "\"' " );
    19881988
    1989             // \p{L} matches a single letter that is not a Chinese, Japanese, etc. char
    1990             if ( ! $term || preg_match( '/^\p{L}$/u', $term ) )
     1989            // Avoid single A-Z.
     1990            if ( ! $term || ( 1 === strlen( $term ) && preg_match( '/^[a-z]$/i', $term ) ) )
    19911991                continue;
    19921992
Note: See TracChangeset for help on using the changeset viewer.