From bb36267be13fa94da779228f25d283ca1ac8ef54 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Fri, 28 Apr 2023 16:58:16 +0200 Subject: [PATCH] FIX edit field value of url --- htdocs/core/class/html.form.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 95572a5c443..ef87b5f5081 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -246,7 +246,7 @@ class Form if (empty($notabletag)) { $ret .= ''; } - if (preg_match('/^(string|safehtmlstring|email)/', $typeofdata)) { + if (preg_match('/^(string|safehtmlstring|email|url)/', $typeofdata)) { $tmp = explode(':', $typeofdata); $ret .= ''; } elseif (preg_match('/^(integer)/', $typeofdata)) { @@ -320,6 +320,8 @@ class Form } else { if (preg_match('/^(email)/', $typeofdata)) { $ret .= dol_print_email($value, 0, 0, 0, 0, 1); + } elseif (preg_match('/^url/', $typeofdata)) { + $ret .= dol_print_url($value, '_blank', 32, 1); } elseif (preg_match('/^(amount|numeric)/', $typeofdata)) { $ret .= ($value != '' ? price($value, '', $langs, 0, -1, -1, $conf->currency) : ''); } elseif (preg_match('/^(checkbox)/', $typeofdata)) {