]> _ Git - cubist_util.git/commitdiff
#7950 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 29 Jan 2026 10:29:23 +0000 (11:29 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 29 Jan 2026 10:29:23 +0000 (11:29 +0100)
src/Text.php

index 62dab5a1341c7cb0997617ebf257f5135544fb79..8bb6004238ab420fa852b1d0913dbac9e7686801 100644 (file)
@@ -319,7 +319,7 @@ class Text
     public static function splitWordsWithCase($str)
     {
         $non_word = '\x{0000}-\x{002F}\x{003A}-\x{0040}\x{005b}-\x{0060}\x{007B}-\x{007E}\x{00A0}-\x{00BF}\s';
-        if (preg_match_all('/([^' . $non_word . ']{3,})/msu', html::clean($str), $match)) {
+        if (preg_match_all('/([^' . $non_word . ']{3,})/msu', $str, $match)) {
             foreach ($match[1] as $i => $v) {
                 $match[1][$i] = $v;
             }
@@ -647,7 +647,8 @@ class Text
         return $text;
     }
 
-    public static function fileGetContentsNormalizedLines($path){
+    public static function fileGetContentsNormalizedLines($path)
+    {
         return static::normalizeLines(file_get_contents($path));
     }
 
@@ -836,13 +837,13 @@ class Text
     public static function splitWords($str, $minChar = 3)
     {
         $non_word = '\x{0000}-\x{002F}\x{003A}-\x{0040}\x{005b}-\x{0060}\x{007B}-\x{007E}\x{00A0}-\x{00BF}\s';
-        if (preg_match_all('/([^' . $non_word . ']{' . $minChar . ',})/msu', html::clean($str), $match)) {
+        if (preg_match_all('/([^' . $non_word . ']{' . $minChar . ',})/msu', $str, $match)) {
             foreach ($match[1] as $i => $v) {
                 $match[1][$i] = mb_strtolower($v);
             }
             return $match[1];
         }
-        return array();
+        return [];
     }
 
     /**