[wp-trac] [WordPress Trac] #31886: wptexturize closing single quotes regex missing punctuation marks

WordPress Trac noreply at wordpress.org
Sat Apr 4 10:46:21 UTC 2015


#31886: wptexturize closing single quotes regex missing punctuation marks
--------------------------+-----------------------------
 Reporter:  Biranit       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Formatting    |    Version:  4.1.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The function wptexturize alters single quotes followed by spaces or ending
 punctuation from regular ' to a curly closing quote.

 However, the regex appears to be missing at least the semi-colon as a
 punctuation mark:


 {{{
   // Single quotes followed by spaces or ending punctuation.
   if ( "'" !== $closing_single_quote ) {
          $dynamic[ '/\'(?=\Z|[.,)}\-\]]|>|' . $spaces . ')/' ] =
 $closing_single_quote;
   }
 }}}

 (And looking at it, I believe it's also missing the colon mark).

 The result is that in a sentence with opening and closing single quote,
 followed by a semi-colon, the closing quote is wrongly texturized. Please
 see attached image to illustrate.

 Thank you,

 Bira

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


More information about the wp-trac mailing list