From 16b0b8de86f4b8aedd012aba6f8a90a7ede0fd16 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 5 Oct 2022 11:07:32 +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 9b7e3cd4df1..663d757bcce 100644 --- a/htdocs/core/tpl/commonfields_view.tpl.php +++ b/htdocs/core/tpl/commonfields_view.tpl.php @@ -91,7 +91,7 @@ foreach ($object->fields as $key => $val) { } print '">'; if (empty($val['alwayseditable'])) { - if (in_array($val['type'], array('text', 'html'))) { + if (preg_match('/^(text|html)/', $val['type'])) { print '
'; } if ($key == 'lang') { @@ -108,7 +108,7 @@ foreach ($object->fields as $key => $val) { } } //print dol_escape_htmltag($object->$key, 1, 1); - if (in_array($val['type'], array('text', 'html'))) { + if (preg_match('/^(text|html)/', $val['type'])) { print '
'; } } else {