From 53478a8acb3287d7d103bcc0665466fcae8c5e98 Mon Sep 17 00:00:00 2001 From: mikelittle Date: Mon, 10 Nov 2003 23:08:59 +0000 Subject: [PATCH] Fix for failing to recognise and replace double quotes at the end of a word when followed by punctuation. git-svn-id: http://svn.automattic.com/wordpress/trunk@534 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- b2-include/b2functions.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/b2-include/b2functions.php b/b2-include/b2functions.php index 23b3061011..af353d7faf 100644 --- a/b2-include/b2functions.php +++ b/b2-include/b2functions.php @@ -42,8 +42,8 @@ function wptexturize($text) { $curl = preg_replace("/(\d+)\"/", "$1″", $curl); $curl = preg_replace("/(\d+)'/", "$1′", $curl); $curl = preg_replace("/(\S)'([^'\s])/", "$1’$2", $curl); - $curl = preg_replace('/"([\s.]|\Z)/', '”$1', $curl); - $curl = preg_replace('/(\s|\A)"/', '$1“', $curl); + $curl = preg_replace('/"([\s.,!?;:&\']|\Z)/', '”$1', $curl); + $curl = preg_replace('/(\s|\A)"/', '$1“', $curl); $curl = preg_replace("/'([\s.]|\Z)/", '’$1', $curl); $curl = preg_replace("/\(tm\)/i", '™', $curl); $curl = preg_replace("/\(c\)/i", '©', $curl); @@ -62,7 +62,7 @@ function wptexturize($text) { $output .= $curl; } return $output; - } +} function wpautop($pee, $br=1) { $pee = $pee . "\n"; // just to make things a little easier, pad the end @@ -1393,6 +1393,7 @@ function apply_filters($tag, $string) { $b2_filter[$tag] = (is_string($b2_filter[$tag])) ? array($b2_filter[$tag]) : $b2_filter[$tag]; $functions = $b2_filter[$tag]; foreach($functions as $function) { + //error_log("apply_filters #1 applying filter $function"); $string = $function($string); } }