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:
@@ -73,6 +73,7 @@ class InputfieldTextarea extends InputfieldText {
|
|||||||
if(in_array($this->contentType, array(FieldtypeTextarea::contentTypeHTML, FieldtypeTextarea::contentTypeImageHTML))) {
|
if(in_array($this->contentType, array(FieldtypeTextarea::contentTypeHTML, FieldtypeTextarea::contentTypeImageHTML))) {
|
||||||
$value = strip_tags($value);
|
$value = strip_tags($value);
|
||||||
}
|
}
|
||||||
|
$value = $this->wire('sanitizer')->textarea($value, array('stripTags' => false));
|
||||||
return parent::getValueLength($value, $countWords);
|
return parent::getValueLength($value, $countWords);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user