mirror of
https://github.com/processwire/processwire.git
synced 2025-08-25 23:56:41 +02:00
Fix issue processwire/processwire-issues#569 when Inputfield::textFormatMarkdown constant used it wasn't replacing default wrapping markup
This commit is contained in:
@@ -434,8 +434,12 @@ class InputfieldWrapper extends Inputfield implements \Countable, \IteratorAggre
|
|||||||
foreach(array('error', 'description', 'head', 'notes') as $property) {
|
foreach(array('error', 'description', 'head', 'notes') as $property) {
|
||||||
$text = $property == 'error' ? $errorsOut : $inputfield->getSetting($property);
|
$text = $property == 'error' ? $errorsOut : $inputfield->getSetting($property);
|
||||||
if(!empty($text) && !$quietMode) {
|
if(!empty($text) && !$quietMode) {
|
||||||
$text = nl2br($entityEncodeText ? $inputfield->entityEncode($text, true) : $text);
|
if($entityEncodeText) {
|
||||||
$text = str_replace('{out}', $text, $markup["item_$property"]);
|
$text = $inputfield->entityEncode($text, true);
|
||||||
|
}
|
||||||
|
if($inputfield->textFormat != Inputfield::textFormatMarkdown) {
|
||||||
|
$text = str_replace('{out}', nl2br($text), $markup["item_$property"]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$text = '';
|
$text = '';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user