Skip to:
Content

BuddyPress.org

Changeset 2415


Ignore:
Timestamp:
01/24/2010 12:14:28 PM (15 years ago)
Author:
apeatling
Message:

Fixes #1660 props junsuijin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-templatetags.php

    r2389 r2415  
    10871087        $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text );
    10881088
    1089     $words = explode(' ', $text, $excerpt_length + 1);
     1089    $words = preg_split(
     1090        "%\s*((?:<[^>]+>)+\S*)\s*|\s+%s",
     1091        $text,
     1092        $excerpt_length + 1,
     1093        PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE
     1094    );
     1095
    10901096    if (count($words) > $excerpt_length) {
    10911097        array_pop($words);
Note: See TracChangeset for help on using the changeset viewer.