From 878ead5d4ae89d3613d3e9c2281b5dad14d2d5ad Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 5 Oct 2022 11:11:23 +0200 Subject: [PATCH] Fix wordbreak not working when field type is 'text:...' --- htdocs/core/tpl/commonfields_view.tpl.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php index 663d757bcce..48642f29135 100644 --- a/htdocs/core/tpl/commonfields_view.tpl.php +++ b/htdocs/core/tpl/commonfields_view.tpl.php @@ -182,7 +182,7 @@ foreach ($object->fields as $key => $val) { $rightpart .= '">'; if (empty($val['alwayseditable'])) { - if (in_array($val['type'], array('text', 'html'))) { + if (preg_match('/^(text|html)/', $val['type'])) { $rightpart .= '
'; } if ($key == 'lang') { @@ -198,7 +198,7 @@ foreach ($object->fields as $key => $val) { $rightpart.= $object->showOutputField($val, $key, $value, '', '', '', 0); } } - if (in_array($val['type'], array('text', 'html'))) { + if (preg_match('/^(text|html)/', $val['type'])) { $rightpart .= '
'; } } else {