mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-04 18:01:42 +01:00
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
This commit is contained in:
parent
8e7909ad04
commit
53478a8acb
@ -42,8 +42,8 @@ function wptexturize($text) {
|
|||||||
$curl = preg_replace("/(\d+)\"/", "$1″", $curl);
|
$curl = preg_replace("/(\d+)\"/", "$1″", $curl);
|
||||||
$curl = preg_replace("/(\d+)'/", "$1′", $curl);
|
$curl = preg_replace("/(\d+)'/", "$1′", $curl);
|
||||||
$curl = preg_replace("/(\S)'([^'\s])/", "$1’$2", $curl);
|
$curl = preg_replace("/(\S)'([^'\s])/", "$1’$2", $curl);
|
||||||
$curl = preg_replace('/"([\s.]|\Z)/', '”$1', $curl);
|
$curl = preg_replace('/"([\s.,!?;:&\']|\Z)/', '”$1', $curl);
|
||||||
$curl = preg_replace('/(\s|\A)"/', '$1“', $curl);
|
$curl = preg_replace('/(\s|\A)"/', '$1“', $curl);
|
||||||
$curl = preg_replace("/'([\s.]|\Z)/", '’$1', $curl);
|
$curl = preg_replace("/'([\s.]|\Z)/", '’$1', $curl);
|
||||||
$curl = preg_replace("/\(tm\)/i", '™', $curl);
|
$curl = preg_replace("/\(tm\)/i", '™', $curl);
|
||||||
$curl = preg_replace("/\(c\)/i", '©', $curl);
|
$curl = preg_replace("/\(c\)/i", '©', $curl);
|
||||||
@ -62,7 +62,7 @@ function wptexturize($text) {
|
|||||||
$output .= $curl;
|
$output .= $curl;
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
function wpautop($pee, $br=1) {
|
function wpautop($pee, $br=1) {
|
||||||
$pee = $pee . "\n"; // just to make things a little easier, pad the end
|
$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];
|
$b2_filter[$tag] = (is_string($b2_filter[$tag])) ? array($b2_filter[$tag]) : $b2_filter[$tag];
|
||||||
$functions = $b2_filter[$tag];
|
$functions = $b2_filter[$tag];
|
||||||
foreach($functions as $function) {
|
foreach($functions as $function) {
|
||||||
|
//error_log("apply_filters #1 applying filter $function");
|
||||||
$string = $function($string);
|
$string = $function($string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user