Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#26852 closed defect (bug) (duplicate)

Bug in wptexturize() with quotes and numbers

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

Description

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
13 years ago

  • Keywords needs-unit-tests added
  • Milestone Awaiting ReviewFuture 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
13 years ago

  • Keywords needs-unit-tests removed
  • Milestone Future Release
  • Resolutionduplicate
  • Status newclosed

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.