From d3fed26d7815b631a6f062711003691bae3f405c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 1 Jun 2022 22:13:42 +0200 Subject: [PATCH] # WARNING: head commit changed in the meantime Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop --- htdocs/core/lib/functions.lib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index fc743889b28..9aad4efb3dd 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3030,6 +3030,10 @@ function dol_print_socialnetworks($value, $cid, $socid, $type, $dictsocialnetwor $tmpvirginurl = preg_replace('/\/?{socialid}/', '', $dictsocialnetworks[$type]['url']); if ($tmpvirginurl) { $value = preg_replace('/'.preg_quote($tmpvirginurl, '/').'\/?/', '', $value); + $tmpvirginurl2 = preg_replace('/^https?:\/\//i', '', $tmpvirginurl); + if ($tmpvirginurl2) { + $value = preg_replace('/'.preg_quote($tmpvirginurl2, '/').'\/?/', '', $value); + } } $link = str_replace('{socialid}', $value, $dictsocialnetworks[$type]['url']); if (preg_match('/^https?:\/\//i', $link)) {