diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index cf43ea0..a4d62aa 100644
a
|
b
|
function wptexturize($text, $reset = false) { |
288 | 288 | } |
289 | 289 | |
290 | 290 | // 9x9 (times), but never 0x9999 |
291 | | if ( 1 === preg_match( '/(?<=\d)x-?\d/', $curl ) ) { |
| 291 | if ( 1 === preg_match( '/(?<=\d)x\d/', $curl ) ) { |
292 | 292 | // 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×$2', $curl ); |
| 293 | $curl = preg_replace( '/\b(\d(?(?<=0)[\d\.,]+|[\d\.,]*))x(\d[\d\.,]*)\b/', '$1×$2', $curl ); |
294 | 294 | } |
295 | 295 | } |
296 | 296 | } |
diff --git a/tests/phpunit/tests/formatting/WPTexturize.php b/tests/phpunit/tests/formatting/WPTexturize.php
index 1187f1e..8776f44 100644
a
|
b
|
class Tests_Formatting_WPTexturize extends WP_UnitTestCase { |
802 | 802 | "-123x1=-123", |
803 | 803 | "-123×1=-123", |
804 | 804 | ), |
| 805 | // @ticket 30445 |
805 | 806 | array( |
806 | 807 | "-123x-1", |
807 | | "-123×-1", |
| 808 | "-123x-1", |
808 | 809 | ), |
809 | 810 | array( |
810 | 811 | "0.675x1=0.675", |