Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#20018 closed defect (bug) (fixed)

Typo in new wptexturize() pattern

Reported by: danielbachhuber Owned by: nacin
Milestone: 3.4 Priority: normal
Severity: normal Version:
Component: Formatting Keywords:
Focuses: Cc:


In r19795, the following:

$dynamic[ '/\'([\s.]|\Z)/' ] = $closing_single_quote . '$2'; // closing single quote

should instead be:

$dynamic[ '/\'([\s.]|\Z)/' ] = $closing_single_quote . '$1'; // closing single quote

The former removes the space from after the new pretty single quote

Change History (4)

#1 @nacin
4 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [19907]:

Use correct reference in regex. props danielbachhuber, fixes #20018.

#2 @nacin
4 years ago

Nice catch, thanks.

#3 @SergeyBiryukov
4 years ago

  • Component changed from General to Formatting
  • Milestone changed from Awaiting Review to 3.4

#4 @nacin
4 years ago

Everything passed the unit tests after r19795, but the ones that maintained whitespace were not tested for that. I added http://unit-tests.trac.wordpress.org/changeset/526, which fails before [19907] and passes now.

Note: See TracTickets for help on using tickets.