Skip to content

Commit

Permalink
Use mb_substr for special character support
Browse files Browse the repository at this point in the history
  • Loading branch information
Viljami Hirvonen committed Dec 14, 2021
1 parent a3280f9 commit c9fd89d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed
### Changed

- TMS-561: Adjust sitemap button styles #311
- TMS-567: Use mb_substr for special character support #311

## [1.30.2] - 2021-12-14

Expand All @@ -19,7 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [1.30.1] - 2021-12-13

### Changed
### Changed

- fix/event-lang: Add language param to API queries #309
- TMS-421: Fixes for overriding partials in child themes
Expand Down
2 changes: 1 addition & 1 deletion lib/Traits/EnrichPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function enrich_post(
$post->excerpt = get_the_excerpt( $post );

if ( ! has_excerpt( $post->ID ) && strlen( $post->excerpt ) > $excerpt_length ) {
$post->excerpt = trim( substr( $post->excerpt, 0, $excerpt_length ) );
$post->excerpt = trim( mb_substr( $post->excerpt, 0, $excerpt_length ) );
}

if ( $display_categories ) {
Expand Down

0 comments on commit c9fd89d

Please sign in to comment.