From 66b539bdab39f4959a092414621dd3badc62bc52 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 10 Jun 2014 14:13:52 +0000 Subject: [PATCH] `wptexturize()` should handle apostrophes before primes. Props nacin, miqrogroove. Fixes #22823. git-svn-id: https://develop.svn.wordpress.org/trunk@28725 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/formatting.php | 10 +++++----- tests/phpunit/tests/formatting/WPTexturize.php | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 36e34a19e9..d4612c4c2b 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -118,6 +118,11 @@ function wptexturize($text) { $dynamic[ '/(?<=\A|[([{<"]|' . $spaces . ')\'/' ] = $opening_single_quote; } + // Apostrophe in a word. No spaces or double apostrophes. + if ( "'" != $apos ) { + $dynamic[ '/(?