Make WordPress Core

Changeset 30752


Ignore:
Timestamp:
12/06/2014 09:23:12 PM (10 years ago)
Author:
markjaquith
Message:

Revert [28719] and no longer math-process multiplication of negative numbers

see #19308
fixes #30445
props rmccue

Location:
trunk
Files:
2 edited

Legend:

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

    r30681 r30752  
    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        }
  • trunk/tests/phpunit/tests/formatting/WPTexturize.php

    r30449 r30752  
    803803                "-123&#215;1=-123",
    804804            ),
     805            // @ticket 30445
    805806            array(
    806807                "-123x-1",
    807                 "-123&#215;-1",
     808                "-123x-1",
    808809            ),
    809810            array(
Note: See TracChangeset for help on using the changeset viewer.