1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-25 07:41:30 +02:00
This commit is contained in:
Ryan Cramer
2019-03-19 05:58:58 -04:00
parent 23208d1ade
commit 762439bcc3
2 changed files with 10 additions and 2 deletions

View File

@@ -212,7 +212,7 @@ class FieldtypeTextarea extends FieldtypeText {
/** @var LanguagesValueInterface $value */
$v = $value->getLanguageValue($language->id);
$this->_htmlReplacement($page, $field, $v, $sleep);
$value->setLanguageValue($language, $v, $field);
$value->setLanguageValue($language, $v);
}
if($trackChanges) $value->setTrackChanges($trackChanges);
@@ -263,6 +263,10 @@ class FieldtypeTextarea extends FieldtypeText {
}
if($useCheckImg) $markupQA->checkImgTags($value, $opts);
}
static $lsep = null;
if($lsep === null) $lsep = $this->wire('sanitizer')->unentities('
');
if(strpos($value, $lsep) !== false) $value = str_replace($lsep, '', $value);
}
/**
@@ -288,6 +292,7 @@ class FieldtypeTextarea extends FieldtypeText {
$this->configHelper()->getInputfieldError($field);
}
/** @var InputfieldTextarea|InputfieldCKEditor $inputfield */
$inputfield->class = $this->className();
return $inputfield;
}
@@ -328,7 +333,7 @@ class FieldtypeTextarea extends FieldtypeText {
*
*/
public function ___getConfigInputfields(Field $field) {
$this->markupQA()->setVerbose(true);
$this->markupQA()->verbose(true);
$inputfields = parent::___getConfigInputfields($field);
$inputfields = $this->configHelper()->getConfigInputfields($field, $inputfields);
return $inputfields;

View File

@@ -595,6 +595,9 @@ class InputfieldCKEditor extends InputfieldTextarea {
$value = str_replace("\xc2\xa0",' ', $value);
}
}
// remove UTF-8 line separator characters
$value = str_replace($this->wire('sanitizer')->unentities('
'), '', $value);
return $value;
}