Smart trim works only with latin characters on words trim

Created on 15 May 2014, almost 11 years ago
Updated 9 January 2025, 3 months ago

When using this module for trimming text on a specified amount of words, it works only on texts with latin characters, because it uses php's str_word_count function to determine the number of words. This function does not truly support utf-8 characters.

While it's not a perfect solution for all alphabets maybe it is better to split words by a regex looking for space characters.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria drupov

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024