#59428: Correct teaser for japanese period character

4.7.x
Steven Wittens 2006-04-21 19:16:12 +00:00
parent 86f2764a7b
commit d469df81c7
2 changed files with 2 additions and 2 deletions

View File

@ -184,7 +184,7 @@ function node_teaser($body, $format = NULL) {
// the Blogger API). In this case, we try to split at paragraph boundaries.
// When even the first paragraph is too long, we try to split at the end of
// the next sentence.
$breakpoints = array('</p>' => 4, '<br />' => 0, '<br>' => 0, "\n" => 0, '. ' => 1, '! ' => 1, '? ' => 1, '。' => 1, '؟ ' => 1);
$breakpoints = array('</p>' => 4, '<br />' => 0, '<br>' => 0, "\n" => 0, '. ' => 1, '! ' => 1, '? ' => 1, '。' => 3, '؟ ' => 1);
foreach ($breakpoints as $point => $charnum) {
if ($length = strpos($body, $point, $size)) {
return substr($body, 0, $length + $charnum);

View File

@ -184,7 +184,7 @@ function node_teaser($body, $format = NULL) {
// the Blogger API). In this case, we try to split at paragraph boundaries.
// When even the first paragraph is too long, we try to split at the end of
// the next sentence.
$breakpoints = array('</p>' => 4, '<br />' => 0, '<br>' => 0, "\n" => 0, '. ' => 1, '! ' => 1, '? ' => 1, '。' => 1, '؟ ' => 1);
$breakpoints = array('</p>' => 4, '<br />' => 0, '<br>' => 0, "\n" => 0, '. ' => 1, '! ' => 1, '? ' => 1, '。' => 3, '؟ ' => 1);
foreach ($breakpoints as $point => $charnum) {
if ($length = strpos($body, $point, $size)) {
return substr($body, 0, $length + $charnum);