diff --git a/includes/core/um-actions-form.php b/includes/core/um-actions-form.php index d0983a3a..3a0b3b42 100644 --- a/includes/core/um-actions-form.php +++ b/includes/core/um-actions-form.php @@ -444,7 +444,7 @@ function um_submit_form_errors_hook_( $args ) { } if ( isset( $array['max_words'] ) && $array['max_words'] > 0 ) { - if ( str_word_count( $args[$key] ) > $array['max_words'] ) { + if ( str_word_count( $args[$key], 0, "éèàôù" ) > $array['max_words'] ) { UM()->form()->add_error($key, sprintf(__('You are only allowed to enter a maximum of %s words','ultimate-member'), $array['max_words']) ); } } diff --git a/includes/um-short-functions.php b/includes/um-short-functions.php index aaca0a5f..3b470330 100644 --- a/includes/um-short-functions.php +++ b/includes/um-short-functions.php @@ -620,7 +620,7 @@ function um_js_redirect( $url ) { * @return string */ function um_get_snippet( $str, $wordCount = 10 ) { - if (str_word_count( $str ) > $wordCount) { + if (str_word_count( $str, 0, "éèàôù" ) > $wordCount) { $str = implode( '', array_slice(