[wp-trac] [WordPress Trac] #12118: wp_texturize converting x to × is too greedy

WordPress Trac wp-trac at lists.automattic.com
Sun Apr 18 08:21:32 UTC 2010


#12118: wp_texturize converting x to × is too greedy
--------------------------+-------------------------------------------------
 Reporter:  mtdewvirus    |       Owner:                  
     Type:  defect (bug)  |      Status:  new             
 Priority:  normal        |   Milestone:  3.0             
Component:  Formatting    |     Version:  3.0             
 Severity:  normal        |    Keywords:  needs-unit-tests
--------------------------+-------------------------------------------------
Changes (by dd32):

  * keywords:  => needs-unit-tests


Comment:

 A quick method for this, would be to have the regex matching word
 boundaries: {{{/\b(\d+)x(\d+)\b/}}} and that seems to work as expected:

 Eg:
 {{{
 "4x4 and 4x20=80 ....2x2, but not A4x4 and  rt2x00";
 string '4×4 and 4×20=80 ….2×2, but not A4x4 and
 rt2x00'
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12118#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list