mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 12:37:51 +02:00
Fixed text field maxlength validation newline issue [#3324]
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
|
||||
1. [](#improved)
|
||||
* Moved `gregwar/Image` and `gregwar/Cache` in-house to official `getgrav/Image` and `getgrav/Cache` packagist packages. This will help environments with very strict proxy setups that don't allow VCS setup. [#3289](https://github.com/getgrav/grav/issues/3289)
|
||||
* Improved XSS Invalid Protocol detection regex [#3298](https://github.com/getgrav/grav/issues/3298)
|
||||
* Improved XSS Invalid Protocol detection regex [#3298](https://github.com/getgrav/grav/issues/3298)
|
||||
1. [](#bugfix)
|
||||
* Fixed `The "Grav/Common/Twig/TwigExtension" extension is not enabled` when using markdown twig tag [#3317](https://github.com/getgrav/grav/issues/3317)
|
||||
* Fixed text field maxlength validation newline issue [#3324](https://github.com/getgrav/grav/issues/3324)
|
||||
|
||||
# v1.7.12
|
||||
## 04/15/2021
|
||||
|
||||
@@ -238,6 +238,7 @@ class Validation
|
||||
$value = trim($value);
|
||||
}
|
||||
|
||||
$value = preg_replace("/\r\n|\r/um", "\n", $value);
|
||||
$len = mb_strlen($value);
|
||||
|
||||
$min = (int)($params['min'] ?? 0);
|
||||
@@ -280,7 +281,7 @@ class Validation
|
||||
$value = trim($value);
|
||||
}
|
||||
|
||||
return $value;
|
||||
return preg_replace("/\r\n|\r/um", "\n", $value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user