File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ private function ConvertHtmlToListOfWords( $characterString ) {
103
103
$ current_word = $ character ;
104
104
$ mode = 'whitespace ' ;
105
105
} else {
106
- if ( ctype_alnum ( $ character ) && ( strlen ($ current_word ) == 0 || ctype_alnum ( $ current_word ) ) ) {
106
+ if ( $ this -> IsAlphaNum ( $ character ) && ( strlen ($ current_word ) == 0 || $ this -> IsAlphaNum ( $ current_word ) ) ) {
107
107
$ current_word .= $ character ;
108
108
} else {
109
109
$ words [] = $ current_word ;
@@ -165,6 +165,10 @@ private function IsWhiteSpace( $value ) {
165
165
return !preg_match ( '[^\s] ' , $ value );
166
166
}
167
167
168
+ private function IsAlphaNum ( $ value ) {
169
+ return preg_match ( '/[\p{L}\p{N}]+/u ' , $ value );
170
+ }
171
+
168
172
private function Explode ( $ value ) {
169
173
// as suggested by @onassar
170
174
return preg_split ( '//u ' , $ value );
You can’t perform that action at this time.
0 commit comments