WordPress.org

Make WordPress Core

Ticket #26850: 26850.4.diff

File 26850.4.diff, 639 bytes (added by miqrogroove, 7 years ago)

Refreshed

  • src/wp-includes/formatting.php

     
    108108                        $dynamic[ '/(?<=\A|' . $spaces . ')\'(\d[\d\.\,]*)\'/' ] = $opening_single_quote . '$1' . $closing_single_quote;
    109109                }
    110110
    111                 // '99 '99s '99's (apostrophe)
     111                // '99 '99s '99's (apostrophe)  But never '9 or '999.
    112112                if ( "'" !== $apos ) {
    113                         $dynamic[ '/\'(?=\d)/' ] = $apos;
     113                        $dynamic[ '/\'(?=\d\d(\D|\Z))/' ] = $apos;
    114114                }
    115115
    116116                // Single quote at start, or preceded by (, {, <, [, ", -, or spaces.