Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#26852 closed defect (bug) (duplicate)

Bug in wptexturize() with quotes and numbers

Reported by: kovshenin Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.5
Component: Formatting Keywords: needs-patch
Focuses: Cc:


To reproduce, run wptexturize() on "Apollo-13".

Expected: “Apollo 13” but got “Apollo 13″. Ouch.

It looks like the double prime rule is preceding the closing quote rule. The same goes for single quote and prime.

Change History (2)

#1 @nacin
8 years ago

  • Keywords needs-unit-tests added
  • Milestone changed from Awaiting Review to Future Release

I saw this recently with "3.8" as well. Needs unit tests. Would be cool to fix, especially if we don't break anything else in the process.

I'd guess that primes are way less common than closing quotes. I'd rather have edge cases with primes becoming apostrophes than apostrophes becoming primes.

This can be moved to a major release milestone with unit tests and a patch.

Nice job tracking this down to 1.5. :-)

#2 @nacin
8 years ago

  • Keywords needs-unit-tests removed
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Apparently, I also saw this with "3.5" at one point. :D See #22823. And I even committed a unit test at the time.

Looks like this may be fixed by a patch on #4539, per #22971. We can probably close #22823 in favor of #4539.

Note: See TracTickets for help on using tickets.