Skip to content

Commit a2fb237

Browse files
authored
Fix parseLines()
1 parent 8966acf commit a2fb237

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Str.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static function stripSpace($string): string
5050
public static function parseLines($text, $toAssoc = true): array
5151
{
5252
$text = htmlspecialchars_decode($text);
53-
$text = self::clean($text);
53+
$text = self::clean($text, false, false, false);
5454

5555
$text = str_replace(["\n", "\r", "\r\n", PHP_EOL], "\n", $text);
5656
$lines = explode("\n", $text);
@@ -86,11 +86,15 @@ public static function parseLines($text, $toAssoc = true): array
8686
* @param string $string
8787
* @param bool $toLower
8888
* @param bool $addSlashes
89+
* @param bool $removeAccents
8990
* @return string
9091
*/
91-
public static function clean($string, $toLower = false, $addSlashes = false): string
92+
public static function clean($string, $toLower = false, $addSlashes = false, $removeAccents = true): string
9293
{
93-
$string = Slug::removeAccents($string);
94+
if ($removeAccents) {
95+
$string = Slug::removeAccents($string);
96+
}
97+
9498
$string = strip_tags($string);
9599
$string = trim($string);
96100

0 commit comments

Comments
 (0)