1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-16 11:44:42 +02:00

Minor adjustment to account for possibility that CRLF may get counted as two bytes in InputfieldTextarea::getTextLength method (for maxlength detection).

This commit is contained in:
Ryan Cramer
2018-02-25 07:40:03 -05:00
parent f3c188254d
commit bd90821d40

View File

@@ -73,6 +73,7 @@ class InputfieldTextarea extends InputfieldText {
if(in_array($this->contentType, array(FieldtypeTextarea::contentTypeHTML, FieldtypeTextarea::contentTypeImageHTML))) {
$value = strip_tags($value);
}
$value = $this->wire('sanitizer')->textarea($value, array('stripTags' => false));
return parent::getValueLength($value, $countWords);
}