Make WordPress Core

Ticket #30445: 30445.diff

File 30445.diff, 712 bytes (added by rmccue, 11 years ago)

Change regex to not include -

  • wp-includes/formatting.php

    diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
    index cf43ea0..a4d62aa 100644
    a b function wptexturize($text, $reset = false) { 
    288288                        }
    289289
    290290                        // 9x9 (times), but never 0x9999
    291                         if ( 1 === preg_match( '/(?<=\d)x-?\d/', $curl ) ) {
     291                        if ( 1 === preg_match( '/(?<=\d)x\d/', $curl ) ) {
    292292                                // Searching for a digit is 10 times more expensive than for the x, so we avoid doing this one!
    293                                 $curl = preg_replace( '/\b(\d(?(?<=0)[\d\.,]+|[\d\.,]*))x(-?\d[\d\.,]*)\b/', '$1&#215;$2', $curl );
     293                                $curl = preg_replace( '/\b(\d(?(?<=0)[\d\.,]+|[\d\.,]*))x(\d[\d\.,]*)\b/', '$1&#215;$2', $curl );
    294294                        }
    295295                }
    296296        }