[wp-trac] [WordPress Trac] #27426: Unit Tests for i18n and wptexturize

WordPress Trac noreply at wordpress.org
Sat Mar 15 18:19:45 UTC 2014


#27426: Unit Tests for i18n and wptexturize
--------------------------+-----------------------------
 Reporter:  miqrogroove   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Formatting    |    Version:  3.8
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 There are some predictable bugs not being tested yet:

 {{{
 $apos = _x( '’', 'apostrophe' );
 $closing_single_quote = _x( '’', 'closing curly single quote' );
 if ( "'" != $apos )
     $dynamic[ '/(\S)\'([^\'\s])/' ] = '$1' . $apos . '$2';
 }}}

 By that logic, quotations with outside punctuation will never work
 correctly.


 {{{
 'This is a test quote'.
 }}}

 becomes...

 {{{
 {$opening_single_quote}This is a test quote{$apos}.
 }}}

 It is easy to miss this bug because closing quotes and apostrophes are
 identical by default.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27426>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list