Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#29813 closed defect (bug) (fixed)

wptexturize inserts opening single quote instead of apostrophe

Reported by: paulschreiber Owned by:
Milestone: 4.2 Priority: normal
Severity: normal Version: 1.5
Component: Formatting Keywords: wptexturize has-patch
Focuses: Cc:


In the following example:
Here are a number of "pick 'em" games

WordPress inserts an opening single quote:
Here are a number of “pick ‘em” games

Correct behaviour would be to insert an apostrophe (close quote):
Here are a number of “pick ’em” games

Attachments (1)

miqro-29813.patch (1.7 KB) - added by miqrogroove 6 years ago.

Download all attachments as: .zip

Change History (8)

#1 @dmchale
6 years ago

Unable to reproduce on my system (Flat theme, WP 4.0).

Copied and pasted OP's example into Text tab in TinyMCE, saved, and confirmed that I received the correct close quote character that is expected, not an opening single quote as reported.

#2 @dmchale
6 years ago

  • Keywords 2nd-opinion added

#3 @miqrogroove
6 years ago

  • Component changed from General to Formatting
  • Keywords wptexturize added; 2nd-opinion removed
  • Version changed from trunk to 1.5

I am recently aware of this bug. While working on 4.0 alpha I noticed the word 'em is strangely absent from the default cockney filter. It can be fixed using a plugin, but I would be in favor of officially adopting 'em as a default word.

#4 @miqrogroove
6 years ago

  • Keywords has-patch added

#5 @pento
6 years ago

  • Milestone changed from Awaiting Review to 4.2
  • Resolution set to fixed
  • Status changed from new to closed

[31249] missed the ticket.

#6 @miqrogroove
6 years ago

Thank you for the commit, pento.

Let me wonder out loud.. is this going to become typographically messy if someone wants to write 'employee of the month' rather than "employee of the month" at some point? Now the former would be somewhat broken and perhaps the static string replacement is not the best strategy.

#7 @pento
6 years ago

I'm not too concerned about that. We haven't had any complaints (that I'm aware of) for the other cockney words that also match real words - tis -> tissue; til -> tile, tiller, tilt; bout -> boutique.

If it becomes an issue, we can revisit the technique we use.

Note: See TracTickets for help on using tickets.