WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/10/2014 02:13:52 PM (7 years ago)
Author:
wonderboymusic
Message:

wptexturize() should handle apostrophes before primes.

Props nacin, miqrogroove.
Fixes #22823.

File:
1 edited

Legend:

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

    r28724 r28725  
    119119        }
    120120
     121        // Apostrophe in a word.  No spaces or double apostrophes.
     122        if ( "'" != $apos ) {
     123            $dynamic[ '/(?<!' . $spaces . ')\'(?!\Z|\'|' . $spaces . ')/' ] = $apos;
     124        }
     125
    121126        // 9" (double prime)
    122127        if ( '"' !== $double_prime ) {
     
    127132        if ( "'" !== $prime ) {
    128133            $dynamic[ '/(?<=\d)\'/' ] = $prime;
    129         }
    130 
    131         // Apostrophe in a word.  No spaces or double primes.
    132         if ( "'" !== $apos ) {
    133             $dynamic[ '/(?<!' . $spaces . ')\'(?!\'|' . $spaces . ')/' ] = $apos;
    134134        }
    135135
Note: See TracChangeset for help on using the changeset viewer.