Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/25/2015 06:50:14 PM (11 years ago)
Author:
boonebgorges
Message:

The continuing adventures of bp_create_excerpt().

This changeset fixes a bug introduced in [9963] that caused excerpts to be
truncated too much in some cases. It also fixes some potential issues with
multibyte strings when html=true.

Merges [9967] to the 2.3 branch for 2.3.3.

Fixes #6517.

Location:
branches/2.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3

    • Property svn:mergeinfo changed
      /trunkmerged: 9967
  • branches/2.3/tests/phpunit/testcases/core/template/bpCreateExcerpt.php

    r9963 r9968  
    5252
    5353    /**
     54     * @ticket BP6517
     55     */
     56    public function test_exact_false_should_properly_account_for_accented_characters() {
     57        $text = 'Toutes les connaissances que les hommes avaient mis sur Internet lui étaient accessible. Les grandes bibliothèques du monde entier n’avaient plus de secret pour lui. Il pouvait apprendre très vite, beaucoup plus vite que n’importe quel humain.
     58Il avait appris toutes les connaissances du monde entier, visiter tout les pays. C’est lui qui avait fait en sorte qu’Internet se déploie ainsi.';
     59        $expected = 'Toutes les connaissances que les hommes avaient mis sur Internet lui étaient accessible. Les';
     60        $this->assertSame( $expected, bp_create_excerpt( $text, 98, array(
     61            'ending' => '',
     62            'exact' => false,
     63        ) ) );
     64    }
     65
     66    /**
    5467     * @ticket BP6254
    5568     */
Note: See TracChangeset for help on using the changeset viewer.